mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Merge commit 'a620881569eecd0938bb4101224b4353d029c788' into dev_loc
This commit is contained in:
commit
a7a1c181a1
59 changed files with 4899 additions and 1392 deletions
|
|
@ -312,10 +312,9 @@ else()
|
|||
set(EXPORT_TARGETS_NAME "Linphone")
|
||||
endif()
|
||||
|
||||
|
||||
add_subdirectory(include)
|
||||
add_subdirectory(java)
|
||||
add_subdirectory(coreapi)
|
||||
add_subdirectory(include)
|
||||
add_subdirectory(share)
|
||||
if(ENABLE_CONSOLE_UI)
|
||||
add_subdirectory(console)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ LOCAL_CPP_EXTENSION := .cc
|
|||
|
||||
LOCAL_SRC_FILES := \
|
||||
account_creator.c \
|
||||
account_creator_request_engine.c \
|
||||
address.c \
|
||||
authentication.c \
|
||||
bellesip_sal/sal_address_impl.c \
|
||||
|
|
@ -192,10 +193,10 @@ endif
|
|||
|
||||
ifneq ($(BUILD_WEBRTC_AECM),0)
|
||||
LOCAL_STATIC_LIBRARIES += \
|
||||
libwebrtc_aecm
|
||||
libwebrtc_aecm
|
||||
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
|
||||
LOCAL_STATIC_LIBRARIES += \
|
||||
libwebrtc_aecm_neon
|
||||
libwebrtc_aecm_neon
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
@ -211,7 +212,7 @@ endif
|
|||
|
||||
ifneq ($(BUILD_ILBC),0)
|
||||
LOCAL_STATIC_LIBRARIES += \
|
||||
libwebrtc_ilbc
|
||||
libwebrtc_ilbc
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -323,4 +324,3 @@ LOCAL_CFLAGS += -Wdeclaration-after-statement
|
|||
LOCAL_LDFLAGS := -Wl,-soname,$(LOCAL_MODULE_FILENAME).so
|
||||
|
||||
$(call import-module,android/cpufeatures)
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ set(LINPHONE_PRIVATE_HEADER_FILES
|
|||
|
||||
set(LINPHONE_SOURCE_FILES_C
|
||||
account_creator.c
|
||||
account_creator_request_engine.c
|
||||
address.c
|
||||
authentication.c
|
||||
bellesip_sal/sal_address_impl.c
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ lib_LTLIBRARIES=liblinphone.la
|
|||
|
||||
liblinphone_la_SOURCES=\
|
||||
account_creator.c \
|
||||
account_creator_request_engine.c \
|
||||
address.c \
|
||||
authentication.c \
|
||||
buffer.c \
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
161
coreapi/account_creator_request_engine.c
Normal file
161
coreapi/account_creator_request_engine.c
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
account_creator_request_engine.c
|
||||
Copyright (C) 2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/account_creator_request_engine.h"
|
||||
#include "linphone/core.h"
|
||||
#include "private.h"
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneAccountCreatorRequestCbs);
|
||||
|
||||
BELLE_SIP_INSTANCIATE_VPTR(LinphoneAccountCreatorRequestCbs, belle_sip_object_t,
|
||||
NULL, // destroy
|
||||
NULL, // clone
|
||||
NULL, // marshal
|
||||
FALSE
|
||||
);
|
||||
|
||||
/************************** Start Account Creator requests_cbs **************************/
|
||||
LinphoneAccountCreatorRequestCbs * linphone_account_creator_requests_cbs_new(void) {
|
||||
return belle_sip_object_new(LinphoneAccountCreatorRequestCbs);
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestCbs * linphone_account_creator_requests_cbs_ref(LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
belle_sip_object_ref(requests_cbs);
|
||||
return requests_cbs;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_unref(LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
belle_sip_object_unref(requests_cbs);
|
||||
}
|
||||
|
||||
void *linphone_account_creator_requests_cbs_get_user_data(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->user_data;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_user_data(LinphoneAccountCreatorRequestCbs *requests_cbs, void *ud) {
|
||||
requests_cbs->user_data = ud;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_constructor_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->account_creator_request_constructor_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_constructor_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->account_creator_request_constructor_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_destructor_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->account_creator_request_destructor_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_destructor_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->account_creator_request_destructor_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_create_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->create_account_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_create_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->create_account_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_exist_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->is_account_exist_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_is_account_exist_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->is_account_exist_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_activate_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->activate_account_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_activate_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->activate_account_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_activated_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->is_account_activated_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_is_account_activated_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->is_account_activated_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_link_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->link_account_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_link_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->link_account_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_activate_alias_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->activate_alias_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_activate_alias_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->activate_alias_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_alias_used_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->is_alias_used_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_is_alias_used_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->is_alias_used_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_linked_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->is_account_linked_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_is_account_linked_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->is_account_linked_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_recover_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->is_account_linked_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_recover_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->recover_account_request_cb = cb;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_update_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs) {
|
||||
return requests_cbs->update_account_request_cb;
|
||||
}
|
||||
|
||||
void linphone_account_creator_requests_cbs_set_update_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb) {
|
||||
requests_cbs->update_account_request_cb = cb;
|
||||
}
|
||||
|
||||
/************************** End Account Creator requests_cbs **************************/
|
||||
|
||||
void linphone_core_set_account_creator_request_engine_cbs(LinphoneCore *lc, LinphoneAccountCreatorRequestCbs *cbs) {
|
||||
if (lc->default_ac_request_cbs)
|
||||
linphone_account_creator_requests_cbs_unref(lc->default_ac_request_cbs);
|
||||
lc->default_ac_request_cbs = cbs;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorRequestCbs* linphone_core_get_account_creator_request_engine_cbs(LinphoneCore *lc) {
|
||||
return lc->default_ac_request_cbs;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
SalAddress * sal_address_new(const char *uri){
|
||||
belle_sip_header_address_t* result;
|
||||
if (uri) {
|
||||
result=belle_sip_header_address_parse (uri);
|
||||
result=belle_sip_header_address_fast_parse (uri);
|
||||
/*may return NULL*/
|
||||
} else {
|
||||
result = belle_sip_header_address_new();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
struct _LinphoneContactSearch{
|
||||
belle_sip_object_t base;
|
||||
ContactSearchID id;
|
||||
LinphoneContactSearchID id;
|
||||
char* predicate;
|
||||
ContactSearchCallback cb;
|
||||
void* data;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static void linphone_contact_search_destroy( LinphoneContactSearch* req) {
|
|||
if( req->predicate ) ms_free(req->predicate);
|
||||
}
|
||||
|
||||
ContactSearchID linphone_contact_search_get_id(LinphoneContactSearch* obj)
|
||||
LinphoneContactSearchID linphone_contact_search_get_id(LinphoneContactSearch* obj)
|
||||
{
|
||||
return obj->id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,11 @@ static LinphoneFriendPresence * find_presence_model_for_uri_or_tel(const Linphon
|
|||
ms_warning("Cannot find uri of tel [%s] from friend [%p] because not associated to any Linphone core object",uri_or_tel,lf);
|
||||
return NULL;
|
||||
}
|
||||
iterator = lf->presence_models;
|
||||
if ((iterator = lf->presence_models) == NULL) {
|
||||
/*no need to move forward, just reutn to avoid useless uri parsing*/
|
||||
return NULL;
|
||||
};
|
||||
|
||||
uri_or_tel_addr = linphone_core_interpret_url(lf->lc, uri_or_tel);
|
||||
|
||||
while (uri_or_tel_addr && iterator) {
|
||||
|
|
|
|||
|
|
@ -26,14 +26,13 @@ if (ENABLE_DOC OR CXX_WRAPPER)
|
|||
if(DOXYGEN_DOT_FOUND)
|
||||
set(top_srcdir "${CMAKE_CURRENT_LIST_DIR}/../../")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
file(GLOB DOC_INPUT_FILES
|
||||
[^.]*.c
|
||||
[^.]*.dox
|
||||
../../include/linphone/[^.]*.h
|
||||
set(DOC_INPUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
${LINPHONE_HEADER_FILES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox
|
||||
)
|
||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html"
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOC_INPUT_FILES}
|
||||
DEPENDS ${DOC_INPUT_FILES}
|
||||
)
|
||||
add_custom_target(linphone-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html")
|
||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml"
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@ TAB_SIZE = 8
|
|||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines.
|
||||
|
||||
ALIASES = "bctbx_list{1}=A list of \ref \1 objects. \xmlonly <bctbxlist>\1</bctbxlist> \endxmlonly"
|
||||
ALIASES = bctbx_list{1}="A list of \ref \1 objects. \xmlonly <bctbxlist>\1</bctbxlist> \endxmlonly"
|
||||
ALIASES += donotwrap="\xmlonly <donotwrap /> \endxmlonly"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
|
|
|
|||
|
|
@ -4149,6 +4149,10 @@ bool_t linphone_call_media_in_progress(LinphoneCall *call){
|
|||
return ret;
|
||||
}
|
||||
|
||||
LinphoneStreamType linphone_call_stats_get_type(const LinphoneCallStats *stats) {
|
||||
return stats->type;
|
||||
}
|
||||
|
||||
float linphone_call_stats_get_sender_loss_rate(const LinphoneCallStats *stats) {
|
||||
const report_block_t *srb = NULL;
|
||||
|
||||
|
|
@ -4255,6 +4259,14 @@ LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *st
|
|||
return stats->upnp_state;
|
||||
}
|
||||
|
||||
LinphoneAddressFamily linphone_call_stats_get_ip_family_of_remote(const LinphoneCallStats *stats) {
|
||||
return (LinphoneAddressFamily)stats->rtp_remote_family;
|
||||
}
|
||||
|
||||
float linphone_call_stats_get_jitter_buffer_size_ms(const LinphoneCallStats *stats) {
|
||||
return stats->jitter_stats.jitter_buffer_size_ms;
|
||||
}
|
||||
|
||||
void linphone_call_start_recording(LinphoneCall *call){
|
||||
if (!call->params->record_file){
|
||||
ms_error("linphone_call_start_recording(): no output file specified. Use linphone_call_params_set_record_file().");
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ static void sound_config_read(LinphoneCore *lc)
|
|||
}
|
||||
|
||||
lc->sound_conf.latency=0;
|
||||
#ifndef __ios
|
||||
#if TARGET_OS_IPHONE
|
||||
tmp=TRUE;
|
||||
#else
|
||||
tmp=FALSE; /* on iOS we have builtin echo cancellation.*/
|
||||
|
|
@ -1231,7 +1231,7 @@ static void certificates_config_read(LinphoneCore *lc) {
|
|||
static void sip_config_read(LinphoneCore *lc) {
|
||||
char *contact;
|
||||
const char *tmpstr;
|
||||
LCSipTransports tr;
|
||||
LinphoneSipTransports tr;
|
||||
int i,tmp;
|
||||
int ipv6_default = TRUE;
|
||||
|
||||
|
|
@ -1687,7 +1687,7 @@ static void video_config_read(LinphoneCore *lc){
|
|||
|
||||
linphone_core_set_preferred_framerate(lc,lp_config_get_float(lc->config,"video","framerate",0));
|
||||
|
||||
#if defined(__ANDROID__) || defined(__ios)
|
||||
#if defined(__ANDROID__) || TARGET_OS_IPHONE
|
||||
automatic_video=0;
|
||||
#endif
|
||||
capture=lp_config_get_int(lc->config,"video","capture",1);
|
||||
|
|
@ -2072,6 +2072,23 @@ static void linphone_core_internal_subscription_state_changed(LinphoneCore *lc,
|
|||
}
|
||||
}
|
||||
|
||||
static void _linphone_core_init_account_creator_request_cbs(LinphoneCore *lc) {
|
||||
LinphoneAccountCreatorRequestCbs *cbs = linphone_account_creator_requests_cbs_new();
|
||||
cbs->account_creator_request_constructor_cb = linphone_account_creator_constructor_custom;
|
||||
cbs->account_creator_request_destructor_cb = NULL;
|
||||
cbs->create_account_request_cb = linphone_account_creator_create_account_custom;
|
||||
cbs->is_account_exist_request_cb = linphone_account_creator_is_account_exist_custom;
|
||||
cbs->activate_account_request_cb = linphone_account_creator_activate_account_custom;
|
||||
cbs->is_account_activated_request_cb = linphone_account_creator_is_account_activated_custom;
|
||||
cbs->link_account_request_cb = linphone_account_creator_link_phone_number_with_account_custom;
|
||||
cbs->activate_alias_request_cb = linphone_account_creator_activate_phone_number_link_custom;
|
||||
cbs->is_alias_used_request_cb = linphone_account_creator_is_phone_number_used_custom;
|
||||
cbs->is_account_linked_request_cb = linphone_account_creator_is_account_linked_custom;
|
||||
cbs->recover_account_request_cb = linphone_account_creator_recover_phone_account_custom;
|
||||
cbs->update_account_request_cb = linphone_account_creator_update_password_custom;
|
||||
linphone_core_set_account_creator_request_engine_cbs(lc, cbs);
|
||||
}
|
||||
|
||||
static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig *config, void * userdata){
|
||||
const char *remote_provisioning_uri = NULL;
|
||||
LinphoneFactory *lfactory = linphone_factory_get();
|
||||
|
|
@ -2087,6 +2104,8 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig
|
|||
|
||||
linphone_task_list_init(&lc->hooks);
|
||||
|
||||
_linphone_core_init_account_creator_request_cbs(lc);
|
||||
|
||||
linphone_core_cbs_set_notify_received(internal_cbs, linphone_core_internal_notify_received);
|
||||
linphone_core_cbs_set_subscription_state_changed(internal_cbs, linphone_core_internal_subscription_state_changed);
|
||||
_linphone_core_add_callbacks(lc, internal_cbs, TRUE);
|
||||
|
|
@ -2442,6 +2461,14 @@ void linphone_core_get_audio_port_range(const LinphoneCore *lc, int *min_port, i
|
|||
*max_port = lc->rtp_conf.audio_rtp_max_port;
|
||||
}
|
||||
|
||||
LinphoneIntRange linphone_core_get_audio_port_range_2(const LinphoneCore *lc) {
|
||||
LinphoneIntRange range = {
|
||||
.min = lc->rtp_conf.audio_rtp_min_port,
|
||||
.max = lc->rtp_conf.audio_rtp_max_port
|
||||
};
|
||||
return range;
|
||||
}
|
||||
|
||||
int linphone_core_get_video_port(const LinphoneCore *lc){
|
||||
return lc->rtp_conf.video_rtp_min_port;
|
||||
}
|
||||
|
|
@ -2451,6 +2478,14 @@ void linphone_core_get_video_port_range(const LinphoneCore *lc, int *min_port, i
|
|||
*max_port = lc->rtp_conf.video_rtp_max_port;
|
||||
}
|
||||
|
||||
LinphoneIntRange linphone_core_get_video_port_range_2(const LinphoneCore *lc) {
|
||||
LinphoneIntRange range = {
|
||||
.min = lc->rtp_conf.video_rtp_min_port,
|
||||
.max = lc->rtp_conf.video_rtp_max_port
|
||||
};
|
||||
return range;
|
||||
}
|
||||
|
||||
int linphone_core_get_text_port(const LinphoneCore *lc) {
|
||||
return lc->rtp_conf.text_rtp_min_port;
|
||||
}
|
||||
|
|
@ -2460,6 +2495,14 @@ void linphone_core_get_text_port_range(const LinphoneCore *lc, int *min_port, in
|
|||
*max_port = lc->rtp_conf.text_rtp_max_port;
|
||||
}
|
||||
|
||||
LinphoneIntRange linphone_core_get_text_port_range_2(const LinphoneCore *lc) {
|
||||
LinphoneIntRange range = {
|
||||
.min = lc->rtp_conf.text_rtp_min_port,
|
||||
.max = lc->rtp_conf.text_rtp_max_port
|
||||
};
|
||||
return range;
|
||||
}
|
||||
|
||||
int linphone_core_get_nortp_timeout(const LinphoneCore *lc){
|
||||
return lc->rtp_conf.nortp_timeout;
|
||||
}
|
||||
|
|
@ -2557,7 +2600,7 @@ void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833)
|
|||
}
|
||||
|
||||
int linphone_core_get_sip_port(LinphoneCore *lc){
|
||||
LCSipTransports tr;
|
||||
LinphoneSipTransports tr;
|
||||
linphone_core_get_sip_transports_used(lc,&tr);
|
||||
return tr.udp_port>0 ? tr.udp_port : (tr.tcp_port > 0 ? tr.tcp_port : tr.tls_port);
|
||||
}
|
||||
|
|
@ -2592,7 +2635,7 @@ static void transport_error(LinphoneCore *lc, const char* transport, int port){
|
|||
ms_free(msg);
|
||||
}
|
||||
|
||||
static bool_t transports_unchanged(const LCSipTransports * tr1, const LCSipTransports * tr2){
|
||||
static bool_t transports_unchanged(const LinphoneSipTransports * tr1, const LinphoneSipTransports * tr2){
|
||||
return
|
||||
tr2->udp_port==tr1->udp_port &&
|
||||
tr2->tcp_port==tr1->tcp_port &&
|
||||
|
|
@ -2614,7 +2657,7 @@ static void __linphone_core_invalidate_registers(LinphoneCore* lc){
|
|||
int _linphone_core_apply_transports(LinphoneCore *lc){
|
||||
Sal *sal=lc->sal;
|
||||
const char *anyaddr;
|
||||
LCSipTransports *tr=&lc->sip_conf.transports;
|
||||
LinphoneSipTransports *tr=&lc->sip_conf.transports;
|
||||
const char* listening_address;
|
||||
/*first of all invalidate all current registrations so that we can register again with new transports*/
|
||||
__linphone_core_invalidate_registers(lc);
|
||||
|
|
@ -2662,7 +2705,7 @@ bool_t linphone_core_sip_transport_supported(const LinphoneCore *lc, LinphoneTra
|
|||
}
|
||||
|
||||
int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports * tr_config /*config to be saved*/){
|
||||
LCSipTransports tr=*tr_config;
|
||||
LinphoneSipTransports tr=*tr_config;
|
||||
|
||||
if (lp_config_get_int(lc->config,"sip","sip_random_port",0)==1) {
|
||||
/*legacy random mode*/
|
||||
|
|
@ -2707,7 +2750,7 @@ void linphone_core_get_sip_transports_used(LinphoneCore *lc, LinphoneSipTranspor
|
|||
}
|
||||
|
||||
void linphone_core_set_sip_port(LinphoneCore *lc,int port) {
|
||||
LCSipTransports tr;
|
||||
LinphoneSipTransports tr;
|
||||
memset(&tr,0,sizeof(tr));
|
||||
tr.udp_port=port;
|
||||
linphone_core_set_sip_transports (lc,&tr);
|
||||
|
|
@ -5712,6 +5755,9 @@ static void linphone_core_uninit(LinphoneCore *lc)
|
|||
if (lc->im_encryption_engine) {
|
||||
linphone_im_encryption_engine_unref(lc->im_encryption_engine);
|
||||
}
|
||||
if (lc->default_ac_request_cbs) {
|
||||
linphone_account_creator_requests_cbs_unref(lc->default_ac_request_cbs);
|
||||
}
|
||||
|
||||
linphone_core_free_payload_types(lc);
|
||||
if (lc->supported_formats) ms_free((void *)lc->supported_formats);
|
||||
|
|
|
|||
|
|
@ -112,33 +112,34 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreFactoryImpl__1setLogHa
|
|||
}
|
||||
|
||||
static void linphone_android_ortp_log_handler(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) {
|
||||
char str[4096];
|
||||
const char *levname = "undef";
|
||||
vsnprintf(str, sizeof(str) - 1, fmt, args);
|
||||
str[sizeof(str) - 1] = '\0';
|
||||
char* str = bctbx_strdup_vprintf(fmt, args);
|
||||
const char *levname = "undef";
|
||||
|
||||
int prio;
|
||||
switch(lev) {
|
||||
case ORTP_DEBUG: prio = ANDROID_LOG_DEBUG; levname="debug"; break;
|
||||
case ORTP_MESSAGE: prio = ANDROID_LOG_INFO; levname="message"; break;
|
||||
case ORTP_WARNING: prio = ANDROID_LOG_WARN; levname="warning"; break;
|
||||
case ORTP_ERROR: prio = ANDROID_LOG_ERROR; levname="error"; break;
|
||||
case ORTP_FATAL: prio = ANDROID_LOG_FATAL; levname="fatal"; break;
|
||||
default: prio = ANDROID_LOG_DEFAULT; break;
|
||||
}
|
||||
if (str == NULL) return;
|
||||
|
||||
if (handler_obj) {
|
||||
JNIEnv *env = ms_get_jni_env();
|
||||
jstring jdomain = env->NewStringUTF(LogDomain);
|
||||
jstring jlevname = env->NewStringUTF(levname);
|
||||
jstring jstr = env->NewStringUTF(str);
|
||||
env->CallVoidMethod(handler_obj, loghandler_id, jdomain, (jint)lev, jlevname, jstr, NULL);
|
||||
if (jdomain) env->DeleteLocalRef(jdomain);
|
||||
if (jlevname) env->DeleteLocalRef(jlevname);
|
||||
if (jstr) env->DeleteLocalRef(jstr);
|
||||
} else {
|
||||
linphone_android_log_handler(prio, str);
|
||||
}
|
||||
int prio;
|
||||
switch(lev) {
|
||||
case ORTP_DEBUG: prio = ANDROID_LOG_DEBUG; levname="debug"; break;
|
||||
case ORTP_MESSAGE: prio = ANDROID_LOG_INFO; levname="message"; break;
|
||||
case ORTP_WARNING: prio = ANDROID_LOG_WARN; levname="warning"; break;
|
||||
case ORTP_ERROR: prio = ANDROID_LOG_ERROR; levname="error"; break;
|
||||
case ORTP_FATAL: prio = ANDROID_LOG_FATAL; levname="fatal"; break;
|
||||
default: prio = ANDROID_LOG_DEFAULT; break;
|
||||
}
|
||||
|
||||
if (handler_obj) {
|
||||
JNIEnv *env = ms_get_jni_env();
|
||||
jstring jdomain = env->NewStringUTF(LogDomain);
|
||||
jstring jlevname = env->NewStringUTF(levname);
|
||||
jstring jstr = env->NewStringUTF(str);
|
||||
env->CallVoidMethod(handler_obj, loghandler_id, jdomain, (jint)lev, jlevname, jstr, NULL);
|
||||
if (jdomain) env->DeleteLocalRef(jdomain);
|
||||
if (jlevname) env->DeleteLocalRef(jlevname);
|
||||
if (jstr) env->DeleteLocalRef(jstr);
|
||||
} else {
|
||||
linphone_android_log_handler(prio, str);
|
||||
}
|
||||
bctbx_free(str);
|
||||
}
|
||||
|
||||
int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() {
|
||||
|
|
@ -386,8 +387,20 @@ public:
|
|||
|
||||
accountCreatorClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreatorImpl"));
|
||||
accountCreatorCtrId = env->GetMethodID(accountCreatorClass, "<init>", "(J)V");
|
||||
accountCreatorStatusClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$Status"));
|
||||
accountCreatorStatusFromIntId = env->GetStaticMethodID(accountCreatorStatusClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$Status;");
|
||||
accountCreatorRequestStatusClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$RequestStatus"));
|
||||
accountCreatorRequestStatusFromIntId = env->GetStaticMethodID(accountCreatorRequestStatusClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;");
|
||||
accountCreatorUsernameCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$UsernameCheck"));
|
||||
accountCreatorUsernameCheckFromIntId = env->GetStaticMethodID(accountCreatorUsernameCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$UsernameCheck;");
|
||||
accountCreatorPasswordCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$PasswordCheck"));
|
||||
accountCreatorPasswordCheckFromIntId = env->GetStaticMethodID(accountCreatorPasswordCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$PasswordCheck;");
|
||||
accountCreatorEmailCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$EmailCheck"));
|
||||
accountCreatorEmailCheckFromIntId = env->GetStaticMethodID(accountCreatorEmailCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$EmailCheck;");
|
||||
accountCreatorLanguageCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$LanguageCheck"));
|
||||
accountCreatorLanguageCheckFromIntId = env->GetStaticMethodID(accountCreatorLanguageCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$LanguageCheck;");
|
||||
accountCreatorCodeActivationCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$ActivationCodeCheck"));
|
||||
accountCreatorCodeActivationCheckFromIntId = env->GetStaticMethodID(accountCreatorCodeActivationCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$ActivationCodeCheck;");
|
||||
accountCreatorPhoneNumberCheckClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneAccountCreator$PhoneNumberCheck"));
|
||||
accountCreatorPhoneNumberCheckFromIntId = env->GetStaticMethodID(accountCreatorPhoneNumberCheckClass,"fromInt","(I)Lorg/linphone/core/LinphoneAccountCreator$PhoneNumberCheck;");
|
||||
}
|
||||
|
||||
void setCore(jobject c) {
|
||||
|
|
@ -424,7 +437,13 @@ public:
|
|||
env->DeleteGlobalRef(logCollectionUploadStateClass);
|
||||
env->DeleteGlobalRef(msFactoryClass);
|
||||
env->DeleteGlobalRef(accountCreatorClass);
|
||||
env->DeleteGlobalRef(accountCreatorStatusClass);
|
||||
env->DeleteGlobalRef(accountCreatorRequestStatusClass);
|
||||
env->DeleteGlobalRef(accountCreatorUsernameCheckClass);
|
||||
env->DeleteGlobalRef(accountCreatorPasswordCheckClass);
|
||||
env->DeleteGlobalRef(accountCreatorEmailCheckClass);
|
||||
env->DeleteGlobalRef(accountCreatorLanguageCheckClass);
|
||||
env->DeleteGlobalRef(accountCreatorCodeActivationCheckClass);
|
||||
env->DeleteGlobalRef(accountCreatorPhoneNumberCheckClass);
|
||||
}
|
||||
|
||||
jobject core;
|
||||
|
|
@ -538,8 +557,20 @@ public:
|
|||
|
||||
jclass accountCreatorClass;
|
||||
jmethodID accountCreatorCtrId;
|
||||
jclass accountCreatorStatusClass;
|
||||
jmethodID accountCreatorStatusFromIntId;
|
||||
jclass accountCreatorRequestStatusClass;
|
||||
jmethodID accountCreatorRequestStatusFromIntId;
|
||||
jclass accountCreatorUsernameCheckClass;
|
||||
jmethodID accountCreatorUsernameCheckFromIntId;
|
||||
jclass accountCreatorPasswordCheckClass;
|
||||
jmethodID accountCreatorPasswordCheckFromIntId;
|
||||
jclass accountCreatorEmailCheckClass;
|
||||
jmethodID accountCreatorEmailCheckFromIntId;
|
||||
jclass accountCreatorLanguageCheckClass;
|
||||
jmethodID accountCreatorLanguageCheckFromIntId;
|
||||
jclass accountCreatorCodeActivationCheckClass;
|
||||
jmethodID accountCreatorCodeActivationCheckFromIntId;
|
||||
jclass accountCreatorPhoneNumberCheckClass;
|
||||
jmethodID accountCreatorPhoneNumberCheckFromIntId;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -8157,15 +8188,15 @@ extern "C" void Java_org_linphone_core_LinphoneXmlRpcSessionImpl_sendRequest(JNI
|
|||
|
||||
// Account creator
|
||||
|
||||
static void account_creator_is_account_used(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_is_account_used(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
ms_error("cannot attach VM\n");
|
||||
return;
|
||||
}
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8175,14 +8206,14 @@ static void account_creator_is_account_used(LinphoneAccountCreator *creator, Lin
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountUsed","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountUsed","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_create_account(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_create_account(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8190,8 +8221,8 @@ static void account_creator_create_account(LinphoneAccountCreator *creator, Linp
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8201,14 +8232,14 @@ static void account_creator_create_account(LinphoneAccountCreator *creator, Linp
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountCreated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountCreated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_activate_account(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_activate_account(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8216,8 +8247,8 @@ static void account_creator_activate_account(LinphoneAccountCreator *creator, Li
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8227,14 +8258,14 @@ static void account_creator_activate_account(LinphoneAccountCreator *creator, Li
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_link_phone_number_with_account(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_link_phone_number_with_account(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8242,8 +8273,8 @@ static void account_creator_link_phone_number_with_account(LinphoneAccountCreato
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8253,14 +8284,14 @@ static void account_creator_link_phone_number_with_account(LinphoneAccountCreato
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountLinkedWithPhoneNumber","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorAccountLinkedWithPhoneNumber","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_activate_phone_number_link(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_activate_phone_number_link(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8268,8 +8299,8 @@ static void account_creator_activate_phone_number_link(LinphoneAccountCreator *c
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8279,14 +8310,14 @@ static void account_creator_activate_phone_number_link(LinphoneAccountCreator *c
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPhoneNumberLinkActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPhoneNumberLinkActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_is_account_linked(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_is_account_linked(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8294,8 +8325,8 @@ static void account_creator_is_account_linked(LinphoneAccountCreator *creator, L
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8305,14 +8336,14 @@ static void account_creator_is_account_linked(LinphoneAccountCreator *creator, L
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountLinked","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountLinked","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_is_phone_number_used(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_is_phone_number_used(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8320,8 +8351,8 @@ static void account_creator_is_phone_number_used(LinphoneAccountCreator *creator
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8331,14 +8362,14 @@ static void account_creator_is_phone_number_used(LinphoneAccountCreator *creator
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsPhoneNumberUsed","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsPhoneNumberUsed","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_is_account_activated(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_is_account_activated(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8346,8 +8377,8 @@ static void account_creator_is_account_activated(LinphoneAccountCreator *creator
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8357,14 +8388,14 @@ static void account_creator_is_account_activated(LinphoneAccountCreator *creator
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorIsAccountActivated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_phone_account_recovered(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_phone_account_recovered(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8372,8 +8403,8 @@ static void account_creator_phone_account_recovered(LinphoneAccountCreator *crea
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8383,14 +8414,14 @@ static void account_creator_phone_account_recovered(LinphoneAccountCreator *crea
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPhoneAccountRecovered","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPhoneAccountRecovered","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
static void account_creator_password_updated(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
|
||||
static void account_creator_password_updated(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char *resp) {
|
||||
JNIEnv *env = 0;
|
||||
jint result = jvm->AttachCurrentThread(&env,NULL);
|
||||
if (result != 0) {
|
||||
|
|
@ -8398,10 +8429,8 @@ static void account_creator_password_updated(LinphoneAccountCreator *creator, Li
|
|||
return;
|
||||
}
|
||||
|
||||
ms_warning("test callback password updated");
|
||||
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_cbs_get_user_data(cbs);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
jobject listener = (jobject) linphone_account_creator_responses_cbs_get_user_data(cbs);
|
||||
if (listener == NULL) {
|
||||
ms_error("account_creator_response() notification without listener");
|
||||
return ;
|
||||
|
|
@ -8411,10 +8440,10 @@ static void account_creator_password_updated(LinphoneAccountCreator *creator, Li
|
|||
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
|
||||
|
||||
jclass clazz = (jclass) env->GetObjectClass(listener);
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPasswordUpdated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$Status;)V");
|
||||
jmethodID method = env->GetMethodID(clazz, "onAccountCreatorPasswordUpdated","(Lorg/linphone/core/LinphoneAccountCreator;Lorg/linphone/core/LinphoneAccountCreator$RequestStatus;)V");
|
||||
env->DeleteLocalRef(clazz);
|
||||
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorStatusClass, ljb->accountCreatorStatusFromIntId, (jint)status);
|
||||
jobject statusObject = env->CallStaticObjectMethod(ljb->accountCreatorRequestStatusClass, ljb->accountCreatorRequestStatusFromIntId, (jint)status);
|
||||
env->CallVoidMethod(listener, method, getAccountCreator(env, creator), statusObject);
|
||||
}
|
||||
|
||||
|
|
@ -8434,26 +8463,26 @@ extern "C" void Java_org_linphone_core_LinphoneAccountCreatorImpl_unref(JNIEnv *
|
|||
extern "C" void Java_org_linphone_core_LinphoneAccountCreatorImpl_setListener(JNIEnv* env, jobject thiz, jlong ptr, jobject jlistener) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
jobject listener = env->NewGlobalRef(jlistener);
|
||||
LinphoneAccountCreatorCbs *cbs;
|
||||
LinphoneAccountCreatorResponseCbs *cbs;
|
||||
|
||||
cbs = linphone_account_creator_get_callbacks(account_creator);
|
||||
linphone_account_creator_cbs_set_user_data(cbs, listener);
|
||||
linphone_account_creator_cbs_set_is_account_used(cbs, account_creator_is_account_used);
|
||||
linphone_account_creator_cbs_set_create_account(cbs, account_creator_create_account);
|
||||
linphone_account_creator_cbs_set_activate_account(cbs, account_creator_activate_account);
|
||||
linphone_account_creator_cbs_set_link_phone_number_with_account(cbs, account_creator_link_phone_number_with_account);
|
||||
linphone_account_creator_cbs_set_activate_phone_number_link(cbs, account_creator_activate_phone_number_link);
|
||||
linphone_account_creator_cbs_set_is_account_activated(cbs, account_creator_is_account_activated);
|
||||
linphone_account_creator_cbs_set_recover_phone_account(cbs, account_creator_phone_account_recovered);
|
||||
linphone_account_creator_cbs_set_is_phone_number_used(cbs, account_creator_is_phone_number_used);
|
||||
linphone_account_creator_cbs_set_is_account_linked(cbs, account_creator_is_account_linked);
|
||||
linphone_account_creator_cbs_set_update_hash(cbs, account_creator_password_updated);
|
||||
cbs = linphone_account_creator_get_responses_cbs(account_creator);
|
||||
linphone_account_creator_responses_cbs_set_user_data(cbs, listener);
|
||||
linphone_account_creator_responses_cbs_set_is_account_exist_cb(cbs, account_creator_is_account_used);
|
||||
linphone_account_creator_responses_cbs_set_create_account_cb(cbs, account_creator_create_account);
|
||||
linphone_account_creator_responses_cbs_set_activate_account_cb(cbs, account_creator_activate_account);
|
||||
linphone_account_creator_responses_cbs_set_link_account_cb(cbs, account_creator_link_phone_number_with_account);
|
||||
linphone_account_creator_responses_cbs_set_activate_alias_cb(cbs, account_creator_activate_phone_number_link);
|
||||
linphone_account_creator_responses_cbs_set_is_account_activated_cb(cbs, account_creator_is_account_activated);
|
||||
linphone_account_creator_responses_cbs_set_recover_account_cb(cbs, account_creator_phone_account_recovered);
|
||||
linphone_account_creator_responses_cbs_set_is_alias_used_cb(cbs, account_creator_is_phone_number_used);
|
||||
linphone_account_creator_responses_cbs_set_is_account_linked_cb(cbs, account_creator_is_account_linked);
|
||||
linphone_account_creator_responses_cbs_set_update_account_cb(cbs, account_creator_password_updated);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setUsername(JNIEnv *env, jobject thiz, jlong ptr, jstring jusername) {
|
||||
const char *username = GetStringUTFChars(env, jusername);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_username(account_creator, username);
|
||||
LinphoneUsernameCheck status = linphone_account_creator_set_username(account_creator, username);
|
||||
ReleaseStringUTFChars(env, jusername, username);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8468,7 +8497,7 @@ extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setPhoneNumber
|
|||
const char *phone_number = GetStringUTFChars(env, jphonenumber);
|
||||
const char *country_code = GetStringUTFChars(env, jcountrycode);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_phone_number(account_creator, phone_number, country_code);
|
||||
LinphonePhoneNumberMask status = linphone_account_creator_set_phone_number(account_creator, phone_number, country_code);
|
||||
ReleaseStringUTFChars(env, jphonenumber, phone_number);
|
||||
ReleaseStringUTFChars(env, jcountrycode, country_code);
|
||||
return (jint) status;
|
||||
|
|
@ -8483,7 +8512,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getPhoneNum
|
|||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setPassword(JNIEnv *env, jobject thiz, jlong ptr, jstring jpassword) {
|
||||
const char *password = GetStringUTFChars(env, jpassword);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_password(account_creator, password);
|
||||
LinphonePasswordCheck status = linphone_account_creator_set_password(account_creator, password);
|
||||
ReleaseStringUTFChars(env, jpassword, password);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8497,7 +8526,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getPassword
|
|||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setHa1(JNIEnv *env, jobject thiz, jlong ptr, jstring jha1) {
|
||||
const char *ha1 = GetStringUTFChars(env, jha1);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_ha1(account_creator, ha1);
|
||||
LinphonePasswordCheck status = linphone_account_creator_set_ha1(account_creator, ha1);
|
||||
ReleaseStringUTFChars(env, jha1, ha1);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8511,7 +8540,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getHa1(JNIE
|
|||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setActivationCode(JNIEnv *env, jobject thiz, jlong ptr, jstring jcode) {
|
||||
const char *activation_code = GetStringUTFChars(env, jcode);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_activation_code(account_creator, activation_code);
|
||||
LinphoneActivationCodeCheck status = linphone_account_creator_set_activation_code(account_creator, activation_code);
|
||||
ReleaseStringUTFChars(env, jcode, activation_code);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8519,55 +8548,15 @@ extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setActivationC
|
|||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setLanguage(JNIEnv *env, jobject thiz, jlong ptr, jstring jlang) {
|
||||
const char *lang = GetStringUTFChars(env, jlang);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_language(account_creator, lang);
|
||||
LinphoneLanguageCheck status = linphone_account_creator_set_language(account_creator, lang);
|
||||
ReleaseStringUTFChars(env, jlang, lang);
|
||||
return (jint) status;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setTransport(JNIEnv *env, jobject thiz, jlong ptr, jint jtransport) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_transport(account_creator, (LinphoneTransportType)jtransport);
|
||||
return (jint) status;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_getTransport(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneTransportType transport = linphone_account_creator_get_transport(account_creator);
|
||||
return (jint) transport;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setDomain(JNIEnv *env, jobject thiz, jlong ptr, jstring jdomain) {
|
||||
const char *domain = GetStringUTFChars(env, jdomain);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_domain(account_creator, domain);
|
||||
ReleaseStringUTFChars(env, jdomain, domain);
|
||||
return (jint) status;
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getDomain(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
const char *domain = linphone_account_creator_get_domain(account_creator);
|
||||
return domain ? env->NewStringUTF(domain) : NULL;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setRoute(JNIEnv *env, jobject thiz, jlong ptr, jstring jroute) {
|
||||
const char *route = GetStringUTFChars(env, jroute);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_route(account_creator, route);
|
||||
ReleaseStringUTFChars(env, jroute, route);
|
||||
return (jint) status;
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getRoute(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
const char *route = linphone_account_creator_get_route(account_creator);
|
||||
return route ? env->NewStringUTF(route) : NULL;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setDisplayName(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
|
||||
const char *name = GetStringUTFChars(env, jname);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_display_name(account_creator, name);
|
||||
LinphoneUsernameCheck status = linphone_account_creator_set_display_name(account_creator, name);
|
||||
ReleaseStringUTFChars(env, jname, name);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8581,7 +8570,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getDisplayN
|
|||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_setEmail(JNIEnv *env, jobject thiz, jlong ptr, jstring jemail) {
|
||||
const char *email = GetStringUTFChars(env, jemail);
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
LinphoneAccountCreatorStatus status = linphone_account_creator_set_email(account_creator, email);
|
||||
LinphoneEmailCheck status = linphone_account_creator_set_email(account_creator, email);
|
||||
ReleaseStringUTFChars(env, jemail, email);
|
||||
return (jint) status;
|
||||
}
|
||||
|
|
@ -8603,7 +8592,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneAccountCreatorImpl_getEmail(JN
|
|||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_isAccountUsed(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
return (jint) linphone_account_creator_is_account_used(account_creator);
|
||||
return (jint) linphone_account_creator_is_account_exist(account_creator);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_createAccount(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
|
|
@ -8623,7 +8612,7 @@ extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_isAccountLinke
|
|||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_isPhoneNumberUsed(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
return (jint) linphone_account_creator_is_phone_number_used(account_creator);
|
||||
return (jint) linphone_account_creator_is_alias_used(account_creator);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_isAccountActivated(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
|
|
@ -8633,26 +8622,28 @@ extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_isAccountActiv
|
|||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_linkPhoneNumberWithAccount(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
return (jint) linphone_account_creator_link_phone_number_with_account(account_creator);
|
||||
return (jint) linphone_account_creator_link_account(account_creator);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_activatePhoneNumberLink(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
return (jint) linphone_account_creator_activate_phone_number_link(account_creator);
|
||||
return (jint) linphone_account_creator_activate_alias(account_creator);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_recoverPhoneAccount(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
return (jint) linphone_account_creator_recover_phone_account(account_creator);
|
||||
return (jint) linphone_account_creator_recover_account(account_creator);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneAccountCreatorImpl_updatePassword(JNIEnv *env, jobject thiz, jlong ptr, jstring jpasswd) {
|
||||
jint status;
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
const char* passwd = GetStringUTFChars(env, jpasswd);
|
||||
status = (jint) linphone_account_creator_update_password(account_creator, passwd);
|
||||
ReleaseStringUTFChars(env, jpasswd, passwd);
|
||||
return status;
|
||||
LinphoneAccountCreator *account_creator = (LinphoneAccountCreator *)ptr;
|
||||
const char* passwd = GetStringUTFChars(env, jpasswd);
|
||||
linphone_account_creator_set_user_data(account_creator, (void*)passwd);
|
||||
status = (jint) linphone_account_creator_update_account(account_creator);
|
||||
linphone_account_creator_set_user_data(account_creator, (void*)NULL);
|
||||
ReleaseStringUTFChars(env, jpasswd, passwd);
|
||||
return status;
|
||||
}
|
||||
|
||||
extern "C" jobject Java_org_linphone_core_LinphoneAccountCreatorImpl_configure(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
|
|
|
|||
|
|
@ -1291,7 +1291,7 @@ void linphone_core_queue_task(LinphoneCore *lc, belle_sip_source_func_t task_fun
|
|||
}
|
||||
|
||||
static int get_unique_transport(LinphoneCore *lc, LinphoneTransportType *type, int *port){
|
||||
LCSipTransports tp;
|
||||
LinphoneSipTransports tp;
|
||||
linphone_core_get_sip_transports(lc,&tp);
|
||||
if (tp.tcp_port==0 && tp.tls_port==0 && tp.udp_port!=0){
|
||||
*type=LinphoneTransportUdp;
|
||||
|
|
@ -1341,7 +1341,7 @@ int linphone_core_migrate_to_multi_transport(LinphoneCore *lc){
|
|||
LinphoneTransportType tpt;
|
||||
int port;
|
||||
if (get_unique_transport(lc,&tpt,&port)==0){
|
||||
LCSipTransports newtp={0};
|
||||
LinphoneSipTransports newtp={0};
|
||||
if (lp_config_get_int(lc->config,"sip","sip_random_port",0))
|
||||
port=-1;
|
||||
ms_message("Core is using a single SIP transport, migrating proxy config and enabling multi-transport.");
|
||||
|
|
@ -1884,3 +1884,22 @@ void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call,
|
|||
linphone_call_set_symmetric_rtp(call, linphone_core_symmetric_rtp_enabled(linphone_call_get_core(call)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Functions to mainpulate the LinphoneIntRange structure */
|
||||
|
||||
int linphone_int_range_get_min(const LinphoneIntRange *range) {
|
||||
return range->min;
|
||||
}
|
||||
|
||||
int linphone_int_range_get_max(const LinphoneIntRange *range) {
|
||||
return range->max;
|
||||
}
|
||||
|
||||
void linphone_int_range_set_min(LinphoneIntRange *range, int min) {
|
||||
range->min = min;
|
||||
}
|
||||
|
||||
void linphone_int_range_set_max(LinphoneIntRange *range, int max) {
|
||||
range->max = max;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ typedef struct sip_config
|
|||
int in_call_timeout; /*timeout after a call is hangup */
|
||||
int delayed_timeout; /*timeout after a delayed call is resumed */
|
||||
unsigned int keepalive_period; /* interval in ms between keep alive messages sent to the proxy server*/
|
||||
LCSipTransports transports;
|
||||
LinphoneSipTransports transports;
|
||||
bool_t guess_hostname;
|
||||
bool_t loopback_only;
|
||||
bool_t ipv6_enabled;
|
||||
|
|
@ -1106,6 +1106,7 @@ struct _LinphoneCore
|
|||
|
||||
LinphoneAddress *default_rls_addr; /*default resource list server*/
|
||||
LinphoneImEncryptionEngine *im_encryption_engine;
|
||||
struct _LinphoneAccountCreatorRequestCbs *default_ac_request_cbs;
|
||||
MSBandwidthController *bw_controller;
|
||||
};
|
||||
|
||||
|
|
@ -1391,43 +1392,80 @@ BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneXmlRpcSession);
|
|||
* Account creator interface *
|
||||
****************************************************************************/
|
||||
|
||||
struct _LinphoneAccountCreatorCbs {
|
||||
struct _LinphoneAccountCreatorRequestCbs {
|
||||
belle_sip_object_t base;
|
||||
void *user_data;
|
||||
LinphoneAccountCreatorCbsStatusCb is_account_used;
|
||||
LinphoneAccountCreatorCbsStatusCb create_account;
|
||||
LinphoneAccountCreatorCbsStatusCb activate_account;
|
||||
LinphoneAccountCreatorCbsStatusCb is_account_activated;
|
||||
LinphoneAccountCreatorCbsStatusCb is_phone_number_used;
|
||||
LinphoneAccountCreatorCbsStatusCb link_phone_number_with_account;
|
||||
LinphoneAccountCreatorCbsStatusCb activate_phone_number_link;
|
||||
LinphoneAccountCreatorCbsStatusCb recover_phone_account;
|
||||
LinphoneAccountCreatorCbsStatusCb is_account_linked;
|
||||
LinphoneAccountCreatorCbsStatusCb update_hash;
|
||||
|
||||
LinphoneAccountCreatorRequestFunc account_creator_request_constructor_cb; /**< Constructor */
|
||||
LinphoneAccountCreatorRequestFunc account_creator_request_destructor_cb; /**< Destructor */
|
||||
|
||||
LinphoneAccountCreatorRequestFunc create_account_request_cb; /**< Request to create account */
|
||||
LinphoneAccountCreatorRequestFunc is_account_exist_request_cb; /**< Request to know if account exist */
|
||||
|
||||
LinphoneAccountCreatorRequestFunc activate_account_request_cb; /**< Request to activate account */
|
||||
LinphoneAccountCreatorRequestFunc is_account_activated_request_cb; /**< Request to know if account is activated */
|
||||
|
||||
LinphoneAccountCreatorRequestFunc link_account_request_cb; /**< Request to link account with an alias */
|
||||
LinphoneAccountCreatorRequestFunc activate_alias_request_cb; /**< Request to activate the link of alias */
|
||||
LinphoneAccountCreatorRequestFunc is_alias_used_request_cb; /**< Request to know if alias is used */
|
||||
LinphoneAccountCreatorRequestFunc is_account_linked_request_cb; /**< Request to know if account is linked with an alias */
|
||||
|
||||
LinphoneAccountCreatorRequestFunc recover_account_request_cb; /**< Request to recover account */
|
||||
LinphoneAccountCreatorRequestFunc update_account_request_cb; /**< Request to update account */
|
||||
};
|
||||
|
||||
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneAccountCreatorCbs);
|
||||
BELLE_SIP_DECLARE_VPTR(LinphoneAccountCreatorRequestCbs);
|
||||
|
||||
struct _LinphoneAccountCreatorResponseCbs {
|
||||
belle_sip_object_t base;
|
||||
void *user_data;
|
||||
|
||||
LinphoneAccountCreatorResponseFunc create_account_response_cb; /**< Response of create_account request */
|
||||
LinphoneAccountCreatorResponseFunc is_account_exist_response_cb; /**< Response of is_account_exist request */
|
||||
|
||||
LinphoneAccountCreatorResponseFunc activate_account_response_cb; /**< Response of activate_account request */
|
||||
LinphoneAccountCreatorResponseFunc is_account_activated_response_cb; /**< Response of is_account_activated request */
|
||||
|
||||
LinphoneAccountCreatorResponseFunc link_account_response_cb; /**< Response of link_account request */
|
||||
LinphoneAccountCreatorResponseFunc activate_alias_response_cb; /**< Response of activation alias */
|
||||
LinphoneAccountCreatorResponseFunc is_alias_used_response_cb; /**< Response of is_alias_used request */
|
||||
LinphoneAccountCreatorResponseFunc is_account_linked_response_cb; /**< Response of is_account_linked request */
|
||||
|
||||
LinphoneAccountCreatorResponseFunc recover_account_response_cb; /**< Response of recover_account request */
|
||||
LinphoneAccountCreatorResponseFunc update_account_response_cb; /**< Response of update_account request */
|
||||
};
|
||||
|
||||
BELLE_SIP_DECLARE_VPTR(LinphoneAccountCreatorResponseCbs);
|
||||
|
||||
struct _LinphoneAccountCreator {
|
||||
belle_sip_object_t base;
|
||||
void *user_data;
|
||||
LinphoneAccountCreatorCbs *callbacks;
|
||||
LinphoneXmlRpcSession *xmlrpc_session;
|
||||
LinphoneCore *core;
|
||||
char *xmlrpc_url;
|
||||
char *username;
|
||||
char *phone_number;
|
||||
char *password;
|
||||
|
||||
/* AccountCreator */
|
||||
LinphoneAccountCreatorRequestCbs *requests_cbs; /**< Account creator requests cbs */
|
||||
LinphoneAccountCreatorResponseCbs *responses_cbs; /**< Account creator responses cbs */
|
||||
LinphoneXmlRpcSession *xmlrpc_session; /**< XML-RPC session */
|
||||
LinphoneProxyConfig *proxy_cfg; /**< Default proxy config */
|
||||
|
||||
/* User */
|
||||
char *username; /**< Username */
|
||||
char *display_name; /**< Display name */
|
||||
/* Password */
|
||||
char *password; /**< Plain text password */
|
||||
char *ha1; /**< Hash password */
|
||||
/* Phone Number(Alias) */
|
||||
char *phone_number; /**< User phone number*/
|
||||
char *phone_country_code; /**< User phone number country code */
|
||||
/* Email(Alias) */
|
||||
char *email; /**< User email */
|
||||
/* Misc */
|
||||
char *language; /**< User language */
|
||||
char *activation_code; /**< Account validation code */
|
||||
|
||||
/* Deprecated */
|
||||
char *domain;
|
||||
char *route;
|
||||
char *email;
|
||||
bool_t subscribe_to_newsletter;
|
||||
char *display_name;
|
||||
LinphoneTransportType transport;
|
||||
char *activation_code;
|
||||
char *ha1;
|
||||
char *phone_country_code;
|
||||
char *language;
|
||||
};
|
||||
|
||||
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneAccountCreator);
|
||||
|
|
@ -1578,7 +1616,8 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngine *linphone_im_encryption_engine_new(Li
|
|||
|
||||
BELLE_SIP_DECLARE_TYPES_BEGIN(linphone,10000)
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreator),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorRequestCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorResponseCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneBuffer),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactProvider),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactSearch),
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ LinphoneProxyConfigAddressComparisonResult linphone_proxy_config_is_server_confi
|
|||
LinphoneAddress *current_proxy=cfg->reg_proxy?linphone_address_new(cfg->reg_proxy):NULL;
|
||||
LinphoneProxyConfigAddressComparisonResult result_identity;
|
||||
LinphoneProxyConfigAddressComparisonResult result;
|
||||
|
||||
|
||||
result = linphone_proxy_config_address_equal(cfg->saved_identity,cfg->identity_address);
|
||||
if (result == LinphoneProxyConfigAddressDifferent) goto end;
|
||||
result_identity = result;
|
||||
|
|
@ -629,7 +629,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
|
|||
LinphoneDialPlan dialplan = {0};
|
||||
char * nationnal_significant_number = NULL;
|
||||
int ccc = -1;
|
||||
|
||||
|
||||
if (linphone_proxy_config_is_phone_number(tmpproxy, username)){
|
||||
char * flatten=flatten_number(username);
|
||||
ms_debug("Flattened number is '%s' for '%s'",flatten, username);
|
||||
|
|
@ -688,7 +688,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
|
|||
ms_free(flatten);
|
||||
}
|
||||
}
|
||||
if (proxy==NULL) linphone_proxy_config_destroy(tmpproxy);
|
||||
if (proxy==NULL) linphone_proxy_config_unref(tmpproxy);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -739,13 +739,13 @@ LinphoneAddress* linphone_proxy_config_normalize_sip_uri(LinphoneProxyConfig *pr
|
|||
}
|
||||
}
|
||||
|
||||
if (proxy!=NULL){
|
||||
if (proxy!=NULL && linphone_proxy_config_get_identity_address(proxy)!=NULL){
|
||||
/* append the proxy domain suffix but remove any custom parameters/headers */
|
||||
LinphoneAddress *uri=linphone_address_clone(linphone_proxy_config_get_identity_address(proxy));
|
||||
linphone_address_clean(uri);
|
||||
if (uri==NULL){
|
||||
return NULL;
|
||||
} else {
|
||||
linphone_address_clean(uri);
|
||||
linphone_address_set_display_name(uri,NULL);
|
||||
linphone_address_set_username(uri,username);
|
||||
return _linphone_core_destroy_addr_if_not_sip(uri);
|
||||
|
|
@ -798,7 +798,7 @@ int linphone_proxy_config_done(LinphoneProxyConfig *cfg)
|
|||
if (cfg->commit){
|
||||
linphone_proxy_config_pause_register(cfg);
|
||||
}
|
||||
|
||||
|
||||
if (linphone_proxy_config_compute_publish_params_hash(cfg)) {
|
||||
ms_message("Publish params have changed on proxy config [%p]",cfg);
|
||||
if (cfg->long_term_event) {
|
||||
|
|
@ -818,7 +818,7 @@ int linphone_proxy_config_done(LinphoneProxyConfig *cfg)
|
|||
} else {
|
||||
ms_message("Publish params have not changed on proxy config [%p]",cfg);
|
||||
}
|
||||
|
||||
|
||||
linphone_proxy_config_write_all_to_config_file(cfg->lc);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "private.h"
|
||||
#include <mediastreamer2/msfactory.h>
|
||||
|
||||
#if __APPLE__
|
||||
#include "TargetConditionals.h"
|
||||
#endif
|
||||
|
||||
int linphone_ringtoneplayer_start(MSFactory *factory, LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms) {
|
||||
return linphone_ringtoneplayer_start_with_cb(factory, rp, card, ringtone, loop_pause_ms, NULL, NULL);
|
||||
}
|
||||
|
||||
#ifdef __ios
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
#include "ringtoneplayer_ios.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ static void process_response_from_post_xml_rpc_request(void *data, const belle_h
|
|||
}
|
||||
|
||||
|
||||
static LinphoneXmlRpcRequest * _linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type) {
|
||||
static LinphoneXmlRpcRequest * _linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method) {
|
||||
LinphoneXmlRpcRequest *request = belle_sip_object_new(LinphoneXmlRpcRequest);
|
||||
request->callbacks = linphone_xml_rpc_request_cbs_new();
|
||||
request->status = LinphoneXmlRpcStatusPending;
|
||||
|
|
@ -306,18 +306,18 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneXmlRpcSession, belle_sip_object_t,
|
|||
);
|
||||
|
||||
|
||||
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type) {
|
||||
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(method, return_type);
|
||||
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method) {
|
||||
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(return_type, method);
|
||||
format_request(request);
|
||||
return request;
|
||||
}
|
||||
|
||||
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(const char *method, LinphoneXmlRpcArgType return_type, ...) {
|
||||
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgType return_type, const char *method, ...) {
|
||||
bool_t cont = TRUE;
|
||||
va_list args;
|
||||
LinphoneXmlRpcArgType arg_type;
|
||||
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(method, return_type);
|
||||
va_start(args, return_type);
|
||||
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(return_type, method);
|
||||
va_start(args, method);
|
||||
while (cont) {
|
||||
arg_type = va_arg(args, LinphoneXmlRpcArgType);
|
||||
switch (arg_type) {
|
||||
|
|
|
|||
|
|
@ -149,43 +149,11 @@ static ostream &printCallStatsHelper(ostream &ostr, const LinphoneCallStats *sta
|
|||
// ostr << prefix << "MaxJitterTs: " << stats->jitter_stats.max_jitter_ts << "\n";
|
||||
ostr << prefix << "JitterBufferSizeMs: " << stats->jitter_stats.jitter_buffer_size_ms << "\n";
|
||||
|
||||
const report_block_t *rrb = NULL;
|
||||
if (stats->received_rtcp != NULL) {
|
||||
if (stats->received_rtcp->b_cont != NULL)
|
||||
msgpullup(stats->received_rtcp, -1);
|
||||
if (rtcp_is_SR(stats->received_rtcp)) {
|
||||
rrb = rtcp_SR_get_report_block(stats->received_rtcp, 0);
|
||||
} else if (rtcp_is_RR(stats->received_rtcp)) {
|
||||
rrb = rtcp_RR_get_report_block(stats->received_rtcp, 0);
|
||||
}
|
||||
}
|
||||
if (rrb) {
|
||||
unsigned int ij;
|
||||
float flost;
|
||||
ij = report_block_get_interarrival_jitter(rrb);
|
||||
flost = (float) (100.0 * report_block_get_fraction_lost(rrb) / 256.0);
|
||||
ostr << prefix << "Received-InterarrivalJitter: " << ij << "\n";
|
||||
ostr << prefix << "Received-FractionLost: " << flost << "\n";
|
||||
}
|
||||
ostr << prefix << "Received-InterarrivalJitter: " << linphone_call_stats_get_receiver_interarrival_jitter(stats) << "\n";
|
||||
ostr << prefix << "Received-FractionLost: " << linphone_call_stats_get_receiver_loss_rate(stats) << "\n";
|
||||
|
||||
const report_block_t *srb = NULL;
|
||||
if (stats->sent_rtcp != NULL) {
|
||||
if (stats->sent_rtcp->b_cont != NULL)
|
||||
msgpullup(stats->sent_rtcp, -1);
|
||||
if (rtcp_is_SR(stats->sent_rtcp)) {
|
||||
srb = rtcp_SR_get_report_block(stats->sent_rtcp, 0);
|
||||
} else if (rtcp_is_RR(stats->sent_rtcp)) {
|
||||
srb = rtcp_RR_get_report_block(stats->sent_rtcp, 0);
|
||||
}
|
||||
}
|
||||
if (srb) {
|
||||
unsigned int ij;
|
||||
float flost;
|
||||
ij = report_block_get_interarrival_jitter(srb);
|
||||
flost = (float) (100.0 * report_block_get_fraction_lost(srb) / 256.0);
|
||||
ostr << prefix << "Sent-InterarrivalJitter: " << ij << "\n";
|
||||
ostr << prefix << "Sent-FractionLost: " << flost << "\n";
|
||||
}
|
||||
ostr << prefix << "Sent-InterarrivalJitter: " << linphone_call_stats_get_sender_interarrival_jitter(stats) << "\n";
|
||||
ostr << prefix << "Sent-FractionLost: " << linphone_call_stats_get_sender_loss_rate(stats) << "\n";
|
||||
return ostr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ static LinphoneAccountCreator * linphone_gtk_assistant_get_creator(GtkWidget *w)
|
|||
return (LinphoneAccountCreator *)g_object_get_data(G_OBJECT(w), "creator");
|
||||
}
|
||||
|
||||
static void linphone_gtk_create_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char* resp) {
|
||||
static void linphone_gtk_create_account_cb(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char* resp) {
|
||||
GtkWidget *assistant = (GtkWidget *)linphone_account_creator_get_user_data(creator);
|
||||
if (status == LinphoneAccountCreatorAccountCreated) {
|
||||
if (status == LinphoneRequestAccountCreated) {
|
||||
// Go to page_6_linphone_account_validation_wait
|
||||
gtk_assistant_set_current_page(GTK_ASSISTANT(assistant), 6);
|
||||
} else { // Error when attempting to create the account
|
||||
|
|
@ -48,9 +48,9 @@ static void create_account(GtkWidget *assistant) {
|
|||
linphone_account_creator_create_account(creator);
|
||||
}
|
||||
|
||||
static void linphone_gtk_test_account_validation_cb(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char* resp) {
|
||||
static void linphone_gtk_test_account_validation_cb(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char* resp) {
|
||||
GtkWidget *assistant = (GtkWidget *)linphone_account_creator_get_user_data(creator);
|
||||
if (status == LinphoneAccountCreatorAccountActivated) {
|
||||
if (status == LinphoneRequestAccountActivated) {
|
||||
// Go to page_9_finish
|
||||
gtk_assistant_set_current_page(GTK_ASSISTANT(assistant), 9);
|
||||
} else {
|
||||
|
|
@ -215,11 +215,11 @@ static gboolean update_interface_with_username_availability(GtkWidget *page) {
|
|||
GtkLabel* usernameError = GTK_LABEL(linphone_gtk_get_widget(assistant, "p4_label_error"));
|
||||
int account_status = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(page), "is_username_used"));
|
||||
|
||||
if (account_status == LinphoneAccountCreatorAccountNotExist) {
|
||||
if (account_status == LinphoneRequestAccountNotExist) {
|
||||
g_object_set_data(G_OBJECT(page), "is_username_available", GINT_TO_POINTER(1));
|
||||
gtk_image_set_from_stock(isUsernameOk, GTK_STOCK_OK, GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
gtk_label_set_text(usernameError, "");
|
||||
} else if (account_status == LinphoneAccountCreatorAccountExist) {
|
||||
} else if (account_status == LinphoneRequestAccountExist) {
|
||||
gtk_label_set_text(usernameError, _("Username is already in use!"));
|
||||
g_object_set_data(G_OBJECT(page), "is_username_available", GINT_TO_POINTER(0));
|
||||
gtk_image_set_from_stock(isUsernameOk, GTK_STOCK_NO, GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
|
@ -232,7 +232,7 @@ static gboolean update_interface_with_username_availability(GtkWidget *page) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void linphone_gtk_test_account_existence_cb(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char* resp) {
|
||||
static void linphone_gtk_test_account_existence_cb(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char* resp) {
|
||||
GtkWidget *assistant = (GtkWidget *)linphone_account_creator_get_user_data(creator);
|
||||
GtkWidget *page = gtk_assistant_get_nth_page(GTK_ASSISTANT(assistant), gtk_assistant_get_current_page(GTK_ASSISTANT(assistant)));
|
||||
g_object_set_data(G_OBJECT(page), "is_username_used", GINT_TO_POINTER(status));
|
||||
|
|
@ -243,7 +243,7 @@ static gboolean check_username_availability(GtkWidget *assistant) {
|
|||
LinphoneAccountCreator *creator = linphone_gtk_assistant_get_creator(assistant);
|
||||
GtkWidget *page = gtk_assistant_get_nth_page(GTK_ASSISTANT(assistant), gtk_assistant_get_current_page(GTK_ASSISTANT(assistant)));
|
||||
g_object_set_data(G_OBJECT(page), "usernameAvailabilityTimerID", GUINT_TO_POINTER(0));
|
||||
linphone_account_creator_is_account_used(creator);
|
||||
linphone_account_creator_is_account_exist(creator);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -324,11 +324,11 @@ void linphone_gtk_account_creation_password_changed(GtkEntry *entry) {
|
|||
|
||||
static void linphone_gtk_assistant_init(GtkWidget *w) {
|
||||
LinphoneAccountCreator *creator = linphone_account_creator_new(linphone_gtk_get_core(), "https://subscribe.linphone.org:444/wizard.php");
|
||||
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
|
||||
LinphoneAccountCreatorResponseCbs *cbs = linphone_account_creator_get_responses_cbs(creator);
|
||||
linphone_account_creator_set_user_data(creator, w);
|
||||
linphone_account_creator_cbs_set_is_account_used(cbs, linphone_gtk_test_account_existence_cb);
|
||||
linphone_account_creator_cbs_set_is_account_activated(cbs, linphone_gtk_test_account_validation_cb);
|
||||
linphone_account_creator_cbs_set_create_account(cbs, linphone_gtk_create_account_cb);
|
||||
linphone_account_creator_responses_cbs_set_is_account_exist_cb(cbs, linphone_gtk_test_account_existence_cb);
|
||||
linphone_account_creator_responses_cbs_set_is_account_activated_cb(cbs, linphone_gtk_test_account_validation_cb);
|
||||
linphone_account_creator_responses_cbs_set_create_account_cb(cbs, linphone_gtk_create_account_cb);
|
||||
g_object_set_data(G_OBJECT(w), "creator", creator);
|
||||
|
||||
gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w), linphone_gtk_assistant_forward, w, NULL);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
set(HEADER_FILES
|
||||
account_creator.h
|
||||
account_creator_request_engine.h
|
||||
address.h
|
||||
auth_info.h
|
||||
buffer.h
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ linphone_includedir=$(includedir)/linphone
|
|||
|
||||
linphone_include_HEADERS=\
|
||||
account_creator.h \
|
||||
account_creator_request_engine.h \
|
||||
address.h \
|
||||
auth_info.h \
|
||||
buffer.h \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
account_creator.h
|
||||
Copyright (C) 2010-2015 Belledonne Communications SARL
|
||||
Copyright (C) 2010-2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
|
@ -27,25 +27,97 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @addtogroup account_creator
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Callback to notify a status change of the account creator.
|
||||
* Callback to notify a response of server.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] status The status of the LinphoneAccountCreator test existence operation that has just finished
|
||||
**/
|
||||
typedef void (*LinphoneAccountCreatorCbsStatusCb)(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char* resp);
|
||||
typedef void (*LinphoneAccountCreatorResponseFunc)(LinphoneAccountCreator *creator, LinphoneRequestStatus status, const char* resp);
|
||||
|
||||
/************************** Start Account Creator data **************************/
|
||||
|
||||
/**
|
||||
* Create a LinphoneAccountCreator.
|
||||
* Create a LinphoneAccountCreator and set Linphone Request callbacks.
|
||||
* @param[in] core The LinphoneCore used for the XML-RPC communication
|
||||
* @param[in] xmlrpc_url The URL to the XML-RPC server. Must be NON NULL.
|
||||
* @return The new LinphoneAccountCreator object
|
||||
* @return The new LinphoneAccountCreator object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreator * linphone_account_creator_new(LinphoneCore *core, const char *xmlrpc_url);
|
||||
|
||||
/**
|
||||
* Send a request to know the existence of account on server.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_exist(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to create an account on server.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_create_account(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to know if an account is activated on server.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_activated(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to activate an account on server.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_activate_account(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to link an account to an alias.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_link_account(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to activate an alias.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_activate_alias(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to know if an alias is used.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_alias_used(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to know if an account is linked.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_linked(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to recover an account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_recover_account(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send a request to update an account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_update_account(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the LinphoneAccountCreator.
|
||||
* @param[in] creator LinphoneAccountCreator object.
|
||||
|
|
@ -77,9 +149,9 @@ LINPHONE_PUBLIC void linphone_account_creator_set_user_data(LinphoneAccountCreat
|
|||
* Set the username.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] username The username to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphoneUsernameOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_username(LinphoneAccountCreator *creator, const char *username);
|
||||
LINPHONE_PUBLIC LinphoneUsernameCheck linphone_account_creator_set_username(LinphoneAccountCreator *creator, const char *username);
|
||||
|
||||
/**
|
||||
* Get the username.
|
||||
|
|
@ -88,22 +160,14 @@ LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_userna
|
|||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_account_creator_get_username(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Update the password.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] new_pwd const char * : new password for the account creator
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_update_password(LinphoneAccountCreator *creator, const char *new_pwd);
|
||||
|
||||
/**
|
||||
* Set the phone number normalized.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] phone_number The phone number to set
|
||||
* @param[in] country_code Country code to associate phone number with
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphonePhoneNumberOk if everything is OK, or specific(s) error(s) otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_phone_number(LinphoneAccountCreator *creator, const char *phone_number, const char *country_code);
|
||||
LINPHONE_PUBLIC LinphonePhoneNumberMask linphone_account_creator_set_phone_number(LinphoneAccountCreator *creator, const char *phone_number, const char *country_code);
|
||||
|
||||
/**
|
||||
* Get the RFC 3966 normalized phone number.
|
||||
|
|
@ -116,9 +180,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_phone_number(const Lin
|
|||
* Set the password.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] password The password to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphonePasswordOk if everything is OK, or specific(s) error(s) otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_password(LinphoneAccountCreator *creator, const char *password);
|
||||
LINPHONE_PUBLIC LinphonePasswordCheck linphone_account_creator_set_password(LinphoneAccountCreator *creator, const char *password);
|
||||
|
||||
/**
|
||||
* Get the password.
|
||||
|
|
@ -131,9 +195,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_password(const Linphon
|
|||
* Set the ha1.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] ha1 The ha1 to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphonePasswordOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_ha1(LinphoneAccountCreator *creator, const char *ha1);
|
||||
LINPHONE_PUBLIC LinphonePasswordCheck linphone_account_creator_set_ha1(LinphoneAccountCreator *creator, const char *ha1);
|
||||
|
||||
/**
|
||||
* Get the ha1.
|
||||
|
|
@ -146,71 +210,42 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_ha1(const LinphoneAcco
|
|||
* Set the activation code.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] activation_code The activation code to set
|
||||
* @return LinphoneActivationCodeOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_activation_code(LinphoneAccountCreator *creator, const char *activation_code);
|
||||
LINPHONE_PUBLIC LinphoneActivationCodeCheck linphone_account_creator_set_activation_code(LinphoneAccountCreator *creator, const char *activation_code);
|
||||
|
||||
/**
|
||||
* Get the activation code.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The activation code of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_account_creator_get_activation_code(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Set the language to use in email or SMS if supported.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] lang The language to use
|
||||
* @return LinphoneLanguageOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_language(LinphoneAccountCreator *creator, const char *lang);
|
||||
LINPHONE_PUBLIC LinphoneLanguageCheck linphone_account_creator_set_language(LinphoneAccountCreator *creator, const char *lang);
|
||||
|
||||
/**
|
||||
* Set the transport.
|
||||
* Get the language use in email of SMS.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] transport The transport to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error if given transport is not supported by linphone core.
|
||||
* @return The language of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_transport(LinphoneAccountCreator *creator, LinphoneTransportType transport);
|
||||
LINPHONE_PUBLIC const char * linphone_account_creator_get_language(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Get the transport.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The transport of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneTransportType linphone_account_creator_get_transport(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Set the domain.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] domain The domain to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain);
|
||||
|
||||
/**
|
||||
* Get the domain.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The domain of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_account_creator_get_domain(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Set the route.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] route The route to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_route(LinphoneAccountCreator *creator, const char *route);
|
||||
|
||||
/**
|
||||
* Get the route.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The route of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_PUBLIC const char * linphone_account_creator_get_route(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Set the email.
|
||||
* Set the display name.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] display_name The display name to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphoneUsernameOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_display_name(LinphoneAccountCreator *creator, const char *display_name);
|
||||
LINPHONE_PUBLIC LinphoneUsernameCheck linphone_account_creator_set_display_name(LinphoneAccountCreator *creator, const char *display_name);
|
||||
|
||||
/**
|
||||
* Get the email.
|
||||
* Get the display name.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The display name of the LinphoneAccountCreator
|
||||
**/
|
||||
|
|
@ -220,9 +255,9 @@ LINPHONE_PUBLIC const char * linphone_account_creator_get_display_name(const Lin
|
|||
* Set the email.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] email The email to set
|
||||
* @return LinphoneAccountCreatorOk if everything is OK, or a specific error otherwise.
|
||||
* @return LinphoneEmailOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_email(LinphoneAccountCreator *creator, const char *email);
|
||||
LINPHONE_PUBLIC LinphoneEmailCheck linphone_account_creator_set_email(LinphoneAccountCreator *creator, const char *email);
|
||||
|
||||
/**
|
||||
* Get the email.
|
||||
|
|
@ -232,234 +267,337 @@ LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_set_email(
|
|||
LINPHONE_PUBLIC const char * linphone_account_creator_get_email(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Get the LinphoneAccountCreatorCbs object associated with a LinphoneAccountCreator.
|
||||
* Set the domain.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The LinphoneAccountCreatorCbs object associated with the LinphoneAccountCreator.
|
||||
* @param[in] domain The domain to set
|
||||
* @return LinphoneRequestOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbs * linphone_account_creator_get_callbacks(const LinphoneAccountCreator *creator);
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_set_domain(LinphoneAccountCreator *creator, const char *domain);
|
||||
|
||||
/**
|
||||
* Get the domain.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The domain of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC const char * linphone_account_creator_get_domain(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Set the route.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] route The route to set
|
||||
* @return LinphoneRequestOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_set_route(LinphoneAccountCreator *creator, const char *route);
|
||||
|
||||
/**
|
||||
* Get the route.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The route of the LinphoneAccountCreator
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC const char * linphone_account_creator_get_route(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Get the LinphoneAccountCreatorResponseCbs object associated with a LinphoneAccountCreator.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The LinphoneAccountCreatorResponseCbs object associated with the LinphoneAccountCreator.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseCbs * linphone_account_creator_get_responses_cbs(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Get the LinphoneAccountCreatorRequestCbs object associated with a LinphoneAccountCreator.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return The LinphoneAccountCreatorRequestCbs object associated with the LinphoneAccountCreator.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestCbs * linphone_account_creator_get_requests_cbs(const LinphoneAccountCreator *creator);
|
||||
|
||||
/************************** End Account Creator data **************************/
|
||||
|
||||
/************************** Start Account Creator Linphone **************************/
|
||||
|
||||
/**
|
||||
* Account creator custom to set Linphone default values
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_constructor_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to test the existence of a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_is_account_used(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_exist_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to create a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_create_account(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_create_account_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to activate a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_activate_account(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_activate_account_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to test the validation of a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_is_account_activated(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_activated_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to test the existence a phone number with a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOk if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_is_phone_number_used(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_phone_number_used_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to link a phone number with a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOK if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_link_phone_number_with_account(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_link_phone_number_with_account_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to activate the link of a phone number with a Linphone account.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneAccountCreatorOK if the request has been sent, LinphoneAccountCreatorReqFailed otherwise
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_activate_phone_number_link(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_activate_phone_number_link_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_recover_phone_account(LinphoneAccountCreator *creator);
|
||||
/**
|
||||
* Send an XML-RPC request to a Linphone account with the phone number.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return LinphoneRequestOk if the request has been sent, LinphoneRequestFailed otherwise
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_recover_phone_account_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to ask if an account is linked with a phone number
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return if this account is linked with a phone number
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_is_account_linked(LinphoneAccountCreator *creator);
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_is_account_linked_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Send an XML-RPC request to ask if an account is linked with a phone number
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @param[in] new_pwd const char * : new password for the account creator
|
||||
* @return LinphoneRequestOk if everything is OK, or a specific error otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneRequestStatus linphone_account_creator_update_password_custom(LinphoneAccountCreator *creator);
|
||||
|
||||
/************************** End Account Creator Linphone **************************/
|
||||
|
||||
/************************** Start Account Creator Cbs **************************/
|
||||
|
||||
/**
|
||||
* Acquire a reference to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The same LinphoneAccountCreatorResponseCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseCbs * linphone_account_creator_responses_cbs_ref(LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Release a reference to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_unref(LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Retrieve the user pointer associated with a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The user pointer associated with the LinphoneAccountCreatorResponseCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void *linphone_account_creator_responses_cbs_get_user_data(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] ud The user pointer to associate with the LinphoneAccountCreatorResponseCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_user_data(LinphoneAccountCreatorResponseCbs *responses_cbs, void *ud);
|
||||
|
||||
/**
|
||||
* Get the create account request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current create account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_create_account_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The create account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_create_account_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account exist request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current is account exist request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_is_account_exist_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The is account exist request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_is_account_exist_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the activate account request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current activate account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_activate_account_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The activate account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_activate_account_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account activated request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current is account activated request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_is_account_activated_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The is account activated request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_is_account_activated_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the link account request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current link account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_link_account_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The link account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_link_account_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the activate alias request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current link account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_activate_alias_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The activate alias request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_activate_alias_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is alias used request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current is alias used request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_is_alias_used_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The is alias used request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_is_alias_used_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account linked request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current is account linked request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_is_account_linked_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The is account linked request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_is_account_linked_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the recover account request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current recover account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_recover_account_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The recover account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_recover_account_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/**
|
||||
* Get the update account request.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @return The current update account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorResponseFunc linphone_account_creator_responses_cbs_get_update_account_cb(const LinphoneAccountCreatorResponseCbs *responses_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] responses_cbs LinphoneAccountCreatorResponseCbs object.
|
||||
* @param[in] cb The update account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_responses_cbs_set_update_account_cb(LinphoneAccountCreatorResponseCbs *responses_cbs, LinphoneAccountCreatorResponseFunc cb);
|
||||
|
||||
/************************** End Account Creator Cbs **************************/
|
||||
|
||||
/**
|
||||
* Configure an account (create a proxy config and authentication info for it).
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
* @return A LinphoneProxyConfig object if successful, NULL otherwise
|
||||
**/
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneProxyConfig * linphone_account_creator_configure(const LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* Acquire a reference to a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The same LinphoneAccountCreatorCbs object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbs * linphone_account_creator_cbs_ref(LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Release a reference to a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_unref(LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Retrieve the user pointer associated with a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The user pointer associated with the LinphoneAccountCreatorCbs object.
|
||||
**/
|
||||
LINPHONE_PUBLIC void *linphone_account_creator_cbs_get_user_data(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] ud The user pointer to associate with the LinphoneAccountCreatorCbs object.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_user_data(LinphoneAccountCreatorCbs *cbs, void *ud);
|
||||
|
||||
/**
|
||||
* Retrieve the user pointer associated with a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The user pointer associated with the LinphoneAccountCreatorCbs object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_update_hash(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The update hash callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_update_hash(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the current linked tested callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current linked tested callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_is_account_linked(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the linked tested callback
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The existence tested callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_is_account_linked(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the existence tested callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current existence tested callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_is_account_used(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the existence tested callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The existence tested callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_is_account_used(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the create account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current create account callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_create_account(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the create account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The create account callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_create_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the activate account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current activate account callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_activate_account(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the activate account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The activate account callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_activate_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the link phone number with account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current link phone number with account callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_link_phone_number_with_account(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the link phone number with account callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The link phone number with account callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_link_phone_number_with_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the activate phone number link callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current activate phone number link callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_activate_phone_number_link(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the activate phone number link callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The activate phone number link callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_activate_phone_number_link(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the validation tested callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current validation tested callback.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_is_account_activated(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the validation tested callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb The validation tested callback to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_is_account_activated(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
/**
|
||||
* Get the is phone number used callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @return The current is phone number used callback
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_is_phone_number_used(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* Set the is phone number used callback.
|
||||
* @param[in] cbs LinphoneAccountCreatorCbs object.
|
||||
* @param[in] cb is phone number to be used.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_is_phone_number_used(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_account_creator_cbs_set_recover_phone_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb);
|
||||
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_recover_phone_account(const LinphoneAccountCreatorCbs *cbs);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
282
include/linphone/account_creator_request_engine.h
Normal file
282
include/linphone/account_creator_request_engine.h
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
/*
|
||||
account_creator_request_engine.h
|
||||
Copyright (C) 2017 Belledonne Communications SARL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LINPHONE_ACCOUNT_CREATOR_REQUEST_ENGINE_H_
|
||||
#define LINPHONE_ACCOUNT_CREATOR_REQUEST_ENGINE_H_
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function to set custom server request.
|
||||
* @param[in] creator LinphoneAccountCreator object
|
||||
*/
|
||||
typedef LinphoneRequestStatus (*LinphoneAccountCreatorRequestFunc)(LinphoneAccountCreator *creator);
|
||||
|
||||
/**
|
||||
* @addtogroup account_creator_request
|
||||
* @{
|
||||
*/
|
||||
|
||||
/************************** Start Account Creator Requests **************************/
|
||||
|
||||
/**
|
||||
* Create a new LinphoneAccountCreatorRequestCbs object.
|
||||
* @return a new LinphoneAccountCreatorRequestCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LinphoneAccountCreatorRequestCbs * linphone_account_creator_requests_cbs_new(void);
|
||||
|
||||
/**
|
||||
* Acquire a reference to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The same LinphoneAccountCreatorRequestCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LinphoneAccountCreatorRequestCbs * linphone_account_creator_requests_cbs_ref(LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Release a reference to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
void linphone_account_creator_requests_cbs_unref(LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Retrieve the user pointer associated with a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The user pointer associated with the LinphoneAccountCreatorRequestCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void *linphone_account_creator_requests_cbs_get_user_data(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] ud The user pointer to associate with the LinphoneAccountCreatorRequestCbs object.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_user_data(LinphoneAccountCreatorRequestCbs *requests_cbs, void *ud);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The constructor of account creator requests.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_constructor_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the constructor of account creator requests.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current constructor of create account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_constructor_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The destructor.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_destructor_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the destructor of create account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current destructor of create account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_destructor_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Get the create account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current create account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_create_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The create account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_create_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account exist request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current is account exist request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_exist_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The is account exist request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_is_account_exist_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the activate account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current activate account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_activate_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The activate account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_activate_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account activated request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current is account activated request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_activated_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The is account activated request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_is_account_activated_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the link account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current link account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_link_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The link account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_link_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the activate alias request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current link account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_activate_alias_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The activate alias request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_activate_alias_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is alias used request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current is alias used request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_alias_used_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The is alias used request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_is_alias_used_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the is account linked request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current is account linked request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_is_account_linked_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The is account linked request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_is_account_linked_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the recover account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current recover account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_recover_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The recover account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_recover_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/**
|
||||
* Get the update account request.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @return The current update account request.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_requests_cbs_get_update_account_cb(const LinphoneAccountCreatorRequestCbs *requests_cbs);
|
||||
|
||||
/**
|
||||
* Assign a user pointer to a LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] requests_cbs LinphoneAccountCreatorRequestCbs object.
|
||||
* @param[in] cb The update account request to be used.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_account_creator_requests_cbs_set_update_account_cb(LinphoneAccountCreatorRequestCbs *requests_cbs, LinphoneAccountCreatorRequestFunc cb);
|
||||
|
||||
/************************** End Account Creator Requests **************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* LINPHONE_ACCOUNT_CREATOR_REQUEST_ENGINE_H_ */
|
||||
|
|
@ -110,6 +110,7 @@ LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri);
|
|||
/**
|
||||
* Returns true if address refers to a secure location (sips)
|
||||
* @deprecated use linphone_address_get_secure()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC bool_t linphone_address_is_secure(const LinphoneAddress *addr);
|
||||
|
||||
|
|
@ -219,6 +220,7 @@ LINPHONE_PUBLIC const char * linphone_address_get_uri_param(const LinphoneAddres
|
|||
/**
|
||||
* Destroys a LinphoneAddress object (actually calls linphone_address_unref()).
|
||||
* @deprecated Use linphone_address_unref() instead
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u);
|
||||
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ LINPHONE_PUBLIC void linphone_call_cancel_dtmfs(LinphoneCall *call);
|
|||
* @param call #LinphoneCall
|
||||
* @return TRUE if part of a conference.
|
||||
* @deprecated Use linphone_call_get_conference() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_call_is_in_conference(const LinphoneCall *call);
|
||||
|
||||
|
|
|
|||
|
|
@ -211,8 +211,9 @@ LINPHONE_PUBLIC void linphone_call_log_unref(LinphoneCallLog *cl);
|
|||
* Destroy a LinphoneCallLog.
|
||||
* @param cl LinphoneCallLog object
|
||||
* @deprecated Use linphone_call_log_unref() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_call_log_destroy(LinphoneCallLog *cl);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_call_log_destroy(LinphoneCallLog *cl);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -441,6 +441,7 @@ LINPHONE_PUBLIC void linphone_call_params_clear_custom_sdp_media_attributes(Linp
|
|||
* Destroy a LinphoneCallParams object.
|
||||
* @param[in] cp LinphoneCallParams object
|
||||
* @deprecated Use linphone_call_params_unref() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_call_params_destroy(LinphoneCallParams *cp);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,13 @@ struct _LinphoneCallStats {
|
|||
bool_t rtcp_received_via_mux; /*private flag, for non-regression test only*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the type of the stream the stats refer to.
|
||||
* @param[in] stats LinphoneCallStats object
|
||||
* @return The type of the stream the stats refer to
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneStreamType linphone_call_stats_get_type(const LinphoneCallStats *stats);
|
||||
|
||||
/**
|
||||
* Get the local loss rate since last report
|
||||
* @return The sender loss rate
|
||||
|
|
@ -131,6 +138,20 @@ LINPHONE_PUBLIC LinphoneIceState linphone_call_stats_get_ice_state(const Linphon
|
|||
*/
|
||||
LINPHONE_PUBLIC LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *stats);
|
||||
|
||||
/**
|
||||
* Get the IP address family of the remote peer.
|
||||
* @param[in] stats LinphoneCallStats object
|
||||
* @return The IP address family of the remote peer.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneAddressFamily linphone_call_stats_get_ip_family_of_remote(const LinphoneCallStats *stats);
|
||||
|
||||
/**
|
||||
* Get the jitter buffer size in ms.
|
||||
* @param[in] stats LinphoneCallStats object
|
||||
* @return The jitter buffer size in ms.
|
||||
*/
|
||||
LINPHONE_PUBLIC float linphone_call_stats_get_jitter_buffer_size_ms(const LinphoneCallStats *stats);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ extern "C" {
|
|||
* @param status LinphoneChatMessageState
|
||||
* @param ud application user data
|
||||
* @deprecated Use LinphoneChatMessageCbsMsgStateChangedCb instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*LinphoneChatMessageStateChangedCb)(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud);
|
||||
|
||||
|
|
@ -80,6 +81,7 @@ typedef void (*LinphoneChatMessageCbsFileTransferProgressIndicationCb)(LinphoneC
|
|||
* Destroy a LinphoneChatRoom.
|
||||
* @param cr #LinphoneChatRoom object
|
||||
* @deprecated Use linphone_chat_room_unref() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_destroy(LinphoneChatRoom *cr);
|
||||
/**
|
||||
|
|
@ -150,6 +152,7 @@ LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(Linph
|
|||
* @deprecated Use linphone_chat_room_send_chat_message() instead.
|
||||
* @param cr #LinphoneChatRoom object
|
||||
* @param msg message to be sent
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
|
||||
|
||||
|
|
@ -162,6 +165,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(Linphon
|
|||
* @deprecated Use linphone_chat_room_send_chat_message() instead.
|
||||
* @note The LinphoneChatMessage must not be destroyed until the the callback is called.
|
||||
* The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangedCb status_cb,void* ud);
|
||||
|
||||
|
|
@ -172,6 +176,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(Linpho
|
|||
* The state of the message sending will be notified via the callbacks defined in the LinphoneChatMessageCbs object that can be obtained
|
||||
* by calling linphone_chat_message_get_callbacks().
|
||||
* The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_room_send_chat_message(LinphoneChatRoom *cr, LinphoneChatMessage *msg);
|
||||
|
||||
|
|
@ -244,6 +249,7 @@ LINPHONE_PUBLIC int linphone_chat_room_get_unread_messages_count(LinphoneChatRoo
|
|||
/**
|
||||
* Returns back pointer to #LinphoneCore object.
|
||||
* @deprecated use linphone_chat_room_get_core()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr);
|
||||
|
||||
|
|
@ -426,6 +432,7 @@ LINPHONE_PUBLIC void linphone_chat_message_set_to_be_stored(LinphoneChatMessage
|
|||
* @param status_cb LinphoneChatMessageStateChangeCb status callback invoked when file is downloaded or could not be downloaded
|
||||
* @param ud user data
|
||||
* @deprecated Use linphone_chat_message_download_file() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_message_start_file_download(LinphoneChatMessage* message, LinphoneChatMessageStateChangedCb status_cb, void* ud);
|
||||
|
||||
|
|
@ -444,6 +451,7 @@ LINPHONE_PUBLIC void linphone_chat_message_cancel_file_transfer(LinphoneChatMess
|
|||
/**
|
||||
* Resend a chat message if it is in the 'not delivered' state for whatever reason.
|
||||
* @param[in] msg LinphoneChatMessage object
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_message_resend(LinphoneChatMessage *msg);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ LINPHONE_PUBLIC void linphone_conference_params_unref(LinphoneConferenceParams *
|
|||
* Free a #LinphoneConferenceParams
|
||||
* @param params #LinphoneConferenceParams to free
|
||||
* @deprecated Use linphone_conference_params_unref() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_conference_params_free(LinphoneConferenceParams *params);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
/* LinphoneContactSearchRequest */
|
||||
|
||||
void linphone_contact_search_init(LinphoneContactSearch *obj, const char *predicate, ContactSearchCallback cb, void *cb_data);
|
||||
ContactSearchID linphone_contact_search_get_id(LinphoneContactSearch *obj);
|
||||
LinphoneContactSearchID linphone_contact_search_get_id(LinphoneContactSearch *obj);
|
||||
const char* linphone_contact_search_get_predicate(LinphoneContactSearch *obj);
|
||||
void linphone_contact_search_invoke_cb(LinphoneContactSearch *req, MSList *friends);
|
||||
LINPHONE_PUBLIC LinphoneContactSearch* linphone_contact_search_ref(void *obj);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "linphone/sipsetup.h"
|
||||
|
||||
#include "linphone/account_creator.h"
|
||||
#include "linphone/account_creator_request_engine.h"
|
||||
#include "linphone/address.h"
|
||||
#include "linphone/auth_info.h"
|
||||
#include "linphone/buffer.h"
|
||||
|
|
@ -183,24 +184,28 @@ typedef LinphoneCoreCbsRegistrationStateChangedCb LinphoneCoreRegistrationStateC
|
|||
/**
|
||||
* Callback prototype
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*ShowInterfaceCb)(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Callback prototype
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*DisplayStatusCb)(LinphoneCore *lc, const char *message);
|
||||
|
||||
/**
|
||||
* Callback prototype
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*DisplayMessageCb)(LinphoneCore *lc, const char *message);
|
||||
|
||||
/**
|
||||
* Callback prototype
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*DisplayUrlCb)(LinphoneCore *lc, const char *message, const char *url);
|
||||
|
||||
|
|
@ -288,11 +293,12 @@ typedef LinphoneCoreCbsCallLogUpdatedCb LinphoneCoreCallLogUpdatedCb;
|
|||
|
||||
/**
|
||||
* Callback prototype
|
||||
* @deprecated use #LinphoneCoreMessageReceivedCb instead.
|
||||
* @param lc #LinphoneCore object
|
||||
* @param room #LinphoneChatRoom involved in this conversation. Can be be created by the framework in case \link #LinphoneAddress the from \endlink is not present in any chat room.
|
||||
* @param from #LinphoneAddress from
|
||||
* @param message incoming message
|
||||
* @deprecated use #LinphoneCoreMessageReceivedCb instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef void (*LinphoneCoreTextMessageReceivedCb)(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message);
|
||||
|
||||
|
|
@ -604,6 +610,7 @@ LINPHONE_PUBLIC void *linphone_core_cbs_get_user_data(const LinphoneCoreCbs *cbs
|
|||
* This is meant only to be called from a callback to be able to get the user_data associated with the #LinphoneCoreCbs that is calling the callback.
|
||||
* @param lc the linphonecore
|
||||
* @return the #LinphoneCoreCbs that has called the last callback
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneCoreCbs *linphone_core_get_current_callbacks(const LinphoneCore *lc);
|
||||
|
||||
|
|
@ -1094,29 +1101,25 @@ LINPHONE_PUBLIC void linphone_core_set_log_level_mask(unsigned int loglevel);
|
|||
|
||||
/**
|
||||
* Enable logs in supplied FILE*.
|
||||
*
|
||||
* @deprecated Use #linphone_core_set_log_file and #linphone_core_set_log_level instead.
|
||||
*
|
||||
* @param file a C FILE* where to fprintf logs. If null stdout is used.
|
||||
*
|
||||
* @deprecated Use #linphone_core_set_log_file and #linphone_core_set_log_level instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_enable_logs(FILE *file);
|
||||
|
||||
/**
|
||||
* Enable logs through the user's supplied log callback.
|
||||
*
|
||||
* @deprecated Use #linphone_core_set_log_handler and #linphone_core_set_log_level instead.
|
||||
*
|
||||
* @param logfunc The address of a OrtpLogFunc callback whose protoype is
|
||||
* typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);
|
||||
*
|
||||
* @deprecated Use #linphone_core_set_log_handler and #linphone_core_set_log_level instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
|
||||
|
||||
/**
|
||||
* Entirely disable logging.
|
||||
*
|
||||
* @deprecated Use #linphone_core_set_log_level instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_disable_logs(void);
|
||||
|
||||
|
|
@ -1138,11 +1141,13 @@ LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *lc);
|
|||
|
||||
/**
|
||||
* @deprecated Use #linphone_core_get_user_agent instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_name(void);
|
||||
|
||||
/**
|
||||
* @deprecated Use #linphone_core_get_user_agent instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_version(void);
|
||||
|
||||
|
|
@ -1169,6 +1174,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_ver
|
|||
* callbacks) using linphone_core_get_user_data().
|
||||
* @see linphone_core_new_with_config
|
||||
* @deprecated Use linphone_factory_create_core() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
|
||||
const char *config_path, const char *factory_config_path, void* userdata);
|
||||
|
|
@ -1185,6 +1191,7 @@ LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_core_new(const Linpho
|
|||
* callbacks) using linphone_core_get_user_data().
|
||||
* @see linphone_core_new
|
||||
* @deprecated Use linphone_factory_create_core_with_config() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_core_new_with_config(const LinphoneCoreVTable *vtable, LpConfig *config, void *userdata);
|
||||
|
||||
|
|
@ -1228,6 +1235,7 @@ LINPHONE_PUBLIC void linphone_core_iterate(LinphoneCore *lc);
|
|||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener.
|
||||
* @param lc object
|
||||
* @deprecated Use linphone_core_add_callbacks() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable);
|
||||
|
||||
|
|
@ -1246,6 +1254,7 @@ LINPHONE_PUBLIC void linphone_core_add_callbacks(LinphoneCore *lc, LinphoneCoreC
|
|||
* @param lc object
|
||||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks.
|
||||
* @deprecated Use linphone_core_remove_callbacks() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_remove_listener(LinphoneCore *lc, const LinphoneCoreVTable *vtable);
|
||||
|
||||
|
|
@ -1631,7 +1640,7 @@ LINPHONE_PUBLIC LinphoneCall *linphone_core_get_call_by_remote_address2(Linphone
|
|||
* This function only works during calls. The dtmf is automatically played to the user.
|
||||
* @param lc The LinphoneCore object
|
||||
* @param dtmf The dtmf name specified as a char, such as '0', '#' etc...
|
||||
*
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_send_dtmf(LinphoneCore *lc, char dtmf);
|
||||
|
||||
|
|
@ -2011,6 +2020,7 @@ LINPHONE_PUBLIC bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, cons
|
|||
* @return TRUE if the payload type represents a VBR codec, FALSE if disabled.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated Use linphone_payload_type_is_vbr() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_payload_type_is_vbr(LinphoneCore *lc, const LinphonePayloadType *pt);
|
||||
|
||||
|
|
@ -2070,6 +2080,7 @@ LINPHONE_PUBLIC LinphonePayloadType* linphone_core_find_payload_type(LinphoneCor
|
|||
* Returns the payload type number assigned for this codec.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated Use linphone_payload_type_get_number() instead
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt);
|
||||
|
||||
|
|
@ -2078,6 +2089,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_payload_type_number(Li
|
|||
* to override the automatic assignment mechanism.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated Use linphone_payload_type_set_number() instead
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_payload_type_number(LinphoneCore *lc, PayloadType *pt, int number);
|
||||
|
||||
|
|
@ -2135,6 +2147,7 @@ LINPHONE_PUBLIC void linphone_core_set_default_proxy_index(LinphoneCore *lc, int
|
|||
/**
|
||||
* @return the default proxy configuration, that is the one used to determine the current identity.
|
||||
* @deprecated Use linphone_core_get_default_proxy_config() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config);
|
||||
|
||||
|
|
@ -2223,6 +2236,20 @@ LINPHONE_PUBLIC void linphone_core_abort_authentication(LinphoneCore *lc, Linpho
|
|||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_clear_all_auth_info(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Sets an default account creator request cbs in the core
|
||||
* @param lc LinphoneCore object
|
||||
* @param cbs LinphoneAccountCreatorRequestCbs object
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_set_account_creator_request_engine_cbs(LinphoneCore *lc, LinphoneAccountCreatorRequestCbs *cbs);
|
||||
|
||||
/**
|
||||
* Get default account creator request cbs from the core
|
||||
* @param lc LinphoneCore object
|
||||
* @return LinphoneAccountCreatorRequestCbs object
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAccountCreatorRequestCbs* linphone_core_get_account_creator_request_engine_cbs(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Enable or disable the audio adaptive jitter compensation.
|
||||
* @param[in] lc #LinphoneCore object
|
||||
|
|
@ -2301,9 +2328,16 @@ LINPHONE_PUBLIC int linphone_core_get_audio_port(const LinphoneCore *lc);
|
|||
* @param[out] min_port The lower bound of the audio port range being used
|
||||
* @param[out] max_port The upper bound of the audio port range being used
|
||||
* @ingroup network_parameters
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_get_audio_port_range(const LinphoneCore *lc, int *min_port, int *max_port);
|
||||
|
||||
/**
|
||||
* Overload of linphone_core_get_audio_port_range().
|
||||
* @ingroup network_parameters
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneIntRange linphone_core_get_audio_port_range_2(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Gets the UDP port used for video streaming.
|
||||
* @param[in] lc LinphoneCore object
|
||||
|
|
@ -2318,9 +2352,16 @@ LINPHONE_PUBLIC int linphone_core_get_video_port(const LinphoneCore *lc);
|
|||
* @param[out] min_port The lower bound of the video port range being used
|
||||
* @param[out] max_port The upper bound of the video port range being used
|
||||
* @ingroup network_parameters
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_get_video_port_range(const LinphoneCore *lc, int *min_port, int *max_port);
|
||||
|
||||
/**
|
||||
* Overload of linphone_core_get_video_port_range().
|
||||
* @ingroup network_parameters
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneIntRange linphone_core_get_video_port_range_2(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Gets the UDP port used for text streaming.
|
||||
* @param[in] lc LinphoneCore object
|
||||
|
|
@ -2335,9 +2376,16 @@ LINPHONE_PUBLIC int linphone_core_get_text_port(const LinphoneCore *lc);
|
|||
* @param[out] min_port The lower bound of the text port range being used
|
||||
* @param[out] max_port The upper bound of the text port range being used
|
||||
* @ingroup network_parameters
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_get_text_port_range(const LinphoneCore *lc, int *min_port, int *max_port);
|
||||
|
||||
/**
|
||||
* Overload of linphone_core_get_text_port_range().
|
||||
* @ingroup network_parameters
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneIntRange linphone_core_get_text_port_range_2(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Gets the value of the no-rtp timeout.
|
||||
*
|
||||
|
|
@ -2455,8 +2503,9 @@ LINPHONE_PUBLIC bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc);
|
|||
* @param[in] port The UDP port to be used by SIP
|
||||
* @ingroup network_parameters
|
||||
* @deprecated use linphone_core_set_sip_transports() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_set_sip_port(LinphoneCore *lc, int port);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_sip_port(LinphoneCore *lc, int port);
|
||||
|
||||
/**
|
||||
* Gets the UDP port used by SIP.
|
||||
|
|
@ -2464,8 +2513,9 @@ LINPHONE_PUBLIC void linphone_core_set_sip_port(LinphoneCore *lc, int port);
|
|||
* @return The UDP port used by SIP
|
||||
* @ingroup network_parameters
|
||||
* @deprecated use linphone_core_get_sip_transports() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_core_get_sip_port(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_sip_port(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Sets the ports to be used for each of transport (UDP or TCP)
|
||||
|
|
@ -2486,6 +2536,7 @@ LINPHONE_PUBLIC int linphone_core_set_sip_transports(LinphoneCore *lc, const Lin
|
|||
* @param[out] transports A #LinphoneSipTransports structure that will receive the configured ports
|
||||
* @return 0
|
||||
* @ingroup network_parameters
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_core_get_sip_transports(LinphoneCore *lc, LinphoneSipTransports *transports);
|
||||
|
||||
|
|
@ -2496,6 +2547,7 @@ LINPHONE_PUBLIC int linphone_core_get_sip_transports(LinphoneCore *lc, LinphoneS
|
|||
* @param[in] lc LinphoneCore object
|
||||
* @param[out] tr A #LinphoneSipTransports structure that will receive the ports being used
|
||||
* @ingroup network_parameters
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_get_sip_transports_used(LinphoneCore *lc, LinphoneSipTransports *tr);
|
||||
|
||||
|
|
@ -2637,6 +2689,7 @@ LINPHONE_PUBLIC const char *linphone_core_get_nat_address(const LinphoneCore *lc
|
|||
* @param[in] pol The #LinphoneFirewallPolicy to use.
|
||||
* @ingroup network_parameters
|
||||
* @deprecated Use linphone_core_set_nat_policy() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol);
|
||||
|
||||
|
|
@ -2645,7 +2698,8 @@ LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_set_firewall_policy(Linph
|
|||
* @param[in] lc #LinphoneCore object.
|
||||
* @return The #LinphoneFirewallPolicy that is being used.
|
||||
* @ingroup network_parameters
|
||||
* @deprecated Use linphone_core_get_nat_policy() instead.
|
||||
* @deprecated Use linphone_core_get_nat_policy() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc);
|
||||
|
||||
|
|
@ -2714,6 +2768,7 @@ LINPHONE_PUBLIC bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc,
|
|||
* Get ring sound level in 0-100 scale.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_ring_level(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -2721,6 +2776,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_ring_level(LinphoneCor
|
|||
* Get playback sound level in 0-100 scale.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_play_level(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -2728,6 +2784,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_play_level(LinphoneCor
|
|||
* Get sound capture level in 0-100 scale.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_rec_level(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -2735,6 +2792,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_rec_level(LinphoneCore
|
|||
* Set sound ring level in 0-100 scale.
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_ring_level(LinphoneCore *lc, int level);
|
||||
|
||||
|
|
@ -2742,6 +2800,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_ring_level(LinphoneCo
|
|||
* Set sound playback level in 0-100 scale.
|
||||
* @deprecated
|
||||
* @ingroup media_parameters
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_play_level(LinphoneCore *lc, int level);
|
||||
|
||||
|
|
@ -2749,6 +2808,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_play_level(LinphoneCo
|
|||
* Set sound capture level in 0-100 scale.
|
||||
* @deprecated
|
||||
* @ingroup media_parameters
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_rec_level(LinphoneCore *lc, int level);
|
||||
|
||||
|
|
@ -3021,12 +3081,14 @@ bool_t linphone_core_agc_enabled(const LinphoneCore *lc);
|
|||
|
||||
/**
|
||||
* @deprecated Use #linphone_core_enable_mic instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted);
|
||||
|
||||
/**
|
||||
* Get mic state.
|
||||
* @deprecated Use #linphone_core_mic_enabled instead
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_is_mic_muted(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -3170,6 +3232,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_supported(LinphoneCore *lc);
|
|||
* @param display_enabled indicates whether video display should be shown
|
||||
* @ingroup media_parameters
|
||||
* @deprecated Use #linphone_core_enable_video_capture and #linphone_core_enable_video_display instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
|
||||
|
||||
|
|
@ -3732,6 +3795,7 @@ LINPHONE_PUBLIC LinphoneConfig * linphone_core_get_config(LinphoneCore *lc);
|
|||
* @param[in] filename The filename of the config file to read to fill the instantiated LpConfig
|
||||
* @ingroup misc
|
||||
* @deprecated Use linphone_core_create_config() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneConfig * linphone_core_create_lp_config(LinphoneCore *lc, const char *filename);
|
||||
|
||||
|
|
@ -3758,6 +3822,7 @@ LINPHONE_PUBLIC const bctbx_list_t * linphone_core_get_sip_setups(LinphoneCore *
|
|||
* @param[in] lc LinphoneCore object
|
||||
* @ingroup initializing
|
||||
* @deprecated Use linphone_core_unref() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_destroy(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -4805,8 +4870,9 @@ LINPHONE_PUBLIC LinphoneFriend * linphone_core_create_friend_with_address(Linpho
|
|||
* @param[in] alternative_contact sip uri used to redirect call in state #LinphoneStatusMoved
|
||||
* @param[in] os #LinphoneOnlineStatus
|
||||
* @deprecated Use linphone_core_set_presence_model() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *alternative_contact,LinphoneOnlineStatus os);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *alternative_contact,LinphoneOnlineStatus os);
|
||||
|
||||
/**
|
||||
* Set my presence model
|
||||
|
|
@ -4820,8 +4886,9 @@ LINPHONE_PUBLIC void linphone_core_set_presence_model(LinphoneCore *lc, Linphone
|
|||
* @param[in] lc #LinphoneCore object
|
||||
* @return #LinphoneOnlineStatus
|
||||
* @deprecated Use linphone_core_get_presence_model() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Get my presence model
|
||||
|
|
@ -4846,8 +4913,9 @@ LINPHONE_PUBLIC void linphone_core_set_consolidated_presence(LinphoneCore *lc, L
|
|||
|
||||
/**
|
||||
* @deprecated Use linphone_core_interpret_url() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result);
|
||||
|
||||
/**
|
||||
* Add a friend to the current buddy list, if \link linphone_friend_enable_subscribes() subscription attribute \endlink is set, a SIP SUBSCRIBE message is sent.
|
||||
|
|
@ -4862,8 +4930,9 @@ LINPHONE_PUBLIC void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *
|
|||
* @param lc #LinphoneCore object
|
||||
* @param fr #LinphoneFriend to remove
|
||||
* @deprecated use linphone_friend_list_remove_friend() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
|
||||
/**
|
||||
* Black list a friend. same as linphone_friend_set_inc_subscribe_policy() with #LinphoneSPDeny policy;
|
||||
|
|
@ -4877,8 +4946,9 @@ LINPHONE_PUBLIC void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneF
|
|||
* @param[in] lc #LinphoneCore object
|
||||
* @return \bctbx_list{LinphoneFriend}
|
||||
* @deprecated use linphone_core_get_friends_lists() or linphone_friend_list_get_friends() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC const bctbx_list_t * linphone_core_get_friend_list(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t * linphone_core_get_friend_list(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Notify all friends that have subscribed
|
||||
|
|
@ -4893,8 +4963,9 @@ LINPHONE_PUBLIC void linphone_core_notify_all_friends(LinphoneCore *lc, Linphone
|
|||
* @param[in] addr The address to use to search the friend.
|
||||
* @return The #LinphoneFriend object corresponding to the given address.
|
||||
* @deprecated use linphone_core_find_friend() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, const char *addr);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, const char *addr);
|
||||
|
||||
/**
|
||||
* Search a LinphoneFriend by its address.
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
* Contructor
|
||||
* @return a new empty #LinphoneFriend
|
||||
* @deprecated use #linphone_core_create_friend instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend * linphone_friend_new(void);
|
||||
|
||||
|
|
@ -43,6 +44,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend * linphone_friend_new(void);
|
|||
* @param addr a buddy address, must be a sip uri like sip:joe@sip.linphone.org
|
||||
* @return a new #LinphoneFriend with \link linphone_friend_get_address() address initialized \endlink
|
||||
* @deprecated use #linphone_core_create_friend_with_address instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend *linphone_friend_new_with_address(const char *addr);
|
||||
|
||||
|
|
@ -56,8 +58,9 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend *linphone_friend_new_with_add
|
|||
* Destroy a LinphoneFriend.
|
||||
* @param lf LinphoneFriend object
|
||||
* @deprecated Use linphone_friend_unref() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_friend_destroy(LinphoneFriend *lf);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_friend_destroy(LinphoneFriend *lf);
|
||||
|
||||
/**
|
||||
* Set #LinphoneAddress for this friend
|
||||
|
|
@ -191,8 +194,9 @@ LINPHONE_PUBLIC void linphone_friend_done(LinphoneFriend *fr);
|
|||
* @param[in] lf A #LinphoneFriend object
|
||||
* @return #LinphoneOnlineStatus
|
||||
* @deprecated Use linphone_friend_get_presence_model() instead
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf);
|
||||
|
||||
/**
|
||||
* Get subscription state of a friend
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup misc
|
||||
* @{
|
||||
|
|
@ -242,4 +246,8 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_generate_file_transfe
|
|||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINPHONE_IM_ENCRYPTION_ENGINE_H */
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ LINPHONE_PUBLIC void linphone_info_message_unref(LinphoneInfoMessage *im);
|
|||
/**
|
||||
* Destroy a LinphoneInfoMessage.
|
||||
* @deprecated Use linphone_info_message_unref() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_info_message_destroy(LinphoneInfoMessage *im);
|
||||
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ LINPHONE_PUBLIC void linphone_config_write_relative_file(const LinphoneConfig *l
|
|||
* @param data Buffer where read string will be stored
|
||||
* @param max_length Length of the buffer
|
||||
* @return 0 on success, -1 on failure
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_config_read_relative_file(const LinphoneConfig *lpconfig, const char *filename, char *data, size_t max_length);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,8 +113,9 @@ LINPHONE_PUBLIC const char *linphone_reason_to_string(LinphoneReason err);
|
|||
* Return humain readable presence status
|
||||
* @param ss
|
||||
* @deprecated Use #LinphonePresenceModel, #LinphonePresenceActivity and linphone_presence_activity_to_string() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
|
||||
|
||||
/**
|
||||
* Convert a string into LinphoneTunnelMode enum
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ extern "C" {
|
|||
/**
|
||||
* Creates an empty proxy config.
|
||||
* @deprecated, use #linphone_core_create_proxy_config instead
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneProxyConfig *linphone_proxy_config_new(void);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneProxyConfig *linphone_proxy_config_new(void);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the proxy config.
|
||||
|
|
@ -75,8 +76,9 @@ LINPHONE_PUBLIC int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *c
|
|||
|
||||
/**
|
||||
* @deprecated Use linphone_proxy_config_set_identity_address()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *identity);
|
||||
|
||||
/**
|
||||
* Sets the user identity as a SIP address.
|
||||
|
|
@ -228,8 +230,9 @@ LINPHONE_PUBLIC LinphoneRegistrationState linphone_proxy_config_get_state(const
|
|||
/**
|
||||
* @return a boolean indicating that the user is sucessfully registered on the proxy.
|
||||
* @deprecated Use linphone_proxy_config_get_state() instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *cfg);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *cfg);
|
||||
|
||||
/**
|
||||
* Get the domain name of the given proxy config.
|
||||
|
|
@ -249,7 +252,6 @@ LINPHONE_PUBLIC const char *linphone_proxy_config_get_realm(const LinphoneProxyC
|
|||
* Set the realm of the given proxy config.
|
||||
* @param[in] cfg #LinphoneProxyConfig object.
|
||||
* @param[in] realm New realm value.
|
||||
* @return The realm of the proxy config.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_realm(LinphoneProxyConfig *cfg, const char * realm);
|
||||
|
||||
|
|
@ -265,8 +267,9 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_proxy_config_get_identity_addres
|
|||
|
||||
/**
|
||||
* @deprecated use linphone_proxy_config_get_identity_address()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *cfg);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *cfg);
|
||||
|
||||
/**
|
||||
* @return TRUE if PUBLISH request is enabled for this proxy.
|
||||
|
|
@ -380,12 +383,12 @@ LINPHONE_PUBLIC const char* linphone_proxy_config_get_transport(const LinphonePr
|
|||
|
||||
/**
|
||||
* Destroys a proxy config.
|
||||
* @deprecated
|
||||
*
|
||||
* @note: LinphoneProxyConfig that have been removed from LinphoneCore with
|
||||
* linphone_core_remove_proxy_config() must not be freed.
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
|
||||
|
||||
|
|
@ -409,6 +412,7 @@ LINPHONE_PUBLIC bool_t linphone_proxy_config_is_phone_number(LinphoneProxyConfig
|
|||
* @param result_len the size of the normalized number \a result
|
||||
* @return TRUE if a phone number was recognized, FALSE otherwise.
|
||||
* @deprecated use linphone_proxy_config_normalize_phone_number()
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len);
|
||||
|
||||
|
|
@ -456,6 +460,7 @@ LINPHONE_PUBLIC LinphonePrivacyMask linphone_proxy_config_get_privacy(const Linp
|
|||
* @param[in] cfg #LinphoneProxyConfig object.
|
||||
* @param server_url URL of the file server like https://file.linphone.org/upload.php
|
||||
* @warning That function isn't implemented yet.
|
||||
* @donotwrap
|
||||
* */
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_file_transfer_server(LinphoneProxyConfig *cfg, const char * server_url);
|
||||
|
||||
|
|
@ -464,6 +469,7 @@ LINPHONE_PUBLIC void linphone_proxy_config_set_file_transfer_server(LinphoneProx
|
|||
* @param[in] cfg #LinphoneProxyConfig object.
|
||||
* @return URL of the file server like https://file.linphone.org/upload.php
|
||||
* @warning That function isn't implemented yet.
|
||||
* @donotwrap
|
||||
* */
|
||||
LINPHONE_PUBLIC const char* linphone_proxy_config_get_file_transfer_server(const LinphoneProxyConfig *cfg);
|
||||
|
||||
|
|
@ -472,16 +478,18 @@ LINPHONE_PUBLIC const char* linphone_proxy_config_get_file_transfer_server(const
|
|||
* @param[in] cfg #LinphoneProxyConfig object.
|
||||
* @param[in] enable True to enable AVPF/SAVF, false to disable it.
|
||||
* @deprecated use linphone_proxy_config_set_avpf_mode()
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_enable_avpf(LinphoneProxyConfig *cfg, bool_t enable);
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_proxy_config_enable_avpf(LinphoneProxyConfig *cfg, bool_t enable);
|
||||
|
||||
/**
|
||||
* Indicates whether AVPF/SAVPF is being used for calls using this proxy config.
|
||||
* @param[in] cfg #LinphoneProxyConfig object.
|
||||
* @return True if AVPF/SAVPF is enabled, false otherwise.
|
||||
* @deprecated use linphone_proxy_config_set_avpf_mode()
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_proxy_config_avpf_enabled(LinphoneProxyConfig *cfg);
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC bool_t linphone_proxy_config_avpf_enabled(LinphoneProxyConfig *cfg);
|
||||
|
||||
/**
|
||||
* Set the interval between regular RTCP reports when using AVPF/SAVPF.
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ LINPHONE_PUBLIC void linphone_tunnel_config_unref(LinphoneTunnelConfig *cfg);
|
|||
* Destroy a tunnel configuration
|
||||
* @param tunnel LinphoneTunnelConfig object
|
||||
* @deprecated use linphone_tunnel_config_unref().
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_tunnel_config_destroy(LinphoneTunnelConfig *tunnel);
|
||||
|
||||
|
|
@ -342,6 +343,7 @@ LINPHONE_PUBLIC void linphone_tunnel_set_http_proxy(LinphoneTunnel *tunnel, cons
|
|||
* @param port http proxy port
|
||||
* @param username Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed.
|
||||
* @param passwd Optional http proxy password. Use NULL if not needed.
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_tunnel_get_http_proxy(LinphoneTunnel*tunnel,const char **host, int *port, const char **username, const char **passwd);
|
||||
|
||||
|
|
@ -359,6 +361,7 @@ LINPHONE_PUBLIC void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel*tun
|
|||
* @param enabled If true enter in tunneled mode, if false exits from tunneled mode.
|
||||
* The TunnelManager takes care of refreshing SIP registration when switching on or off the tunneled mode.
|
||||
* @deprecated Replaced by linphone_tunnel_set_mode()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled);
|
||||
|
||||
|
|
@ -367,6 +370,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_tunnel_enable(LinphoneTunnel *
|
|||
* @param tunnel Tunnel object
|
||||
* @return Returns a boolean indicating whether tunneled operation is enabled.
|
||||
* @deprecated Replaced by linphone_tunnel_get_mode()
|
||||
* @donotwrap
|
||||
**/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_tunnel_enabled(const LinphoneTunnel *tunnel);
|
||||
|
||||
|
|
@ -377,6 +381,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_tunnel_enabled(const Linphon
|
|||
* <br>In case of success, the tunnel is automatically turned off. Otherwise, if no udp communication is feasible, tunnel mode is turned on.
|
||||
* <br> Call this method each time to run the auto detection algorithm
|
||||
* @deprecated Replaced by linphone_tunnel_set_mode(LinphoneTunnelModeAuto)
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel);
|
||||
|
||||
|
|
@ -385,6 +390,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_tunnel_auto_detect(LinphoneTun
|
|||
* @param[in] tunnel LinphoneTunnel object.
|
||||
* @return TRUE if auto detection is enabled, FALSE otherwise.
|
||||
* @deprecated Replaced by linphone_tunnel_get_mode()
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_tunnel_auto_detect_enabled(LinphoneTunnel *tunnel);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,64 +28,127 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
|
||||
/**
|
||||
* The LinphoneAccountCreator object used to create an account on a server via XML-RPC.
|
||||
* @ingroup misc
|
||||
* The LinphoneAccountCreator object used to configure an account on a server via XML-RPC.
|
||||
* @ingroup account_creator
|
||||
**/
|
||||
typedef struct _LinphoneAccountCreator LinphoneAccountCreator;
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for handling the LinphoneAccountCreator operations.
|
||||
* @ingroup misc
|
||||
* An object to handle the requests callbacks for handling the LinphoneAccountCreator server requests.
|
||||
* @ingroup account_creator
|
||||
**/
|
||||
typedef struct _LinphoneAccountCreatorCbs LinphoneAccountCreatorCbs;
|
||||
typedef struct _LinphoneAccountCreatorRequestCbs LinphoneAccountCreatorRequestCbs;
|
||||
|
||||
/**
|
||||
* Enum describing the status of a LinphoneAccountCreator operation.
|
||||
* @ingroup misc
|
||||
* An object to handle the responses callbacks for handling the LinphoneAccountCreator operations.
|
||||
* @ingroup account_creator
|
||||
**/
|
||||
typedef enum _LinphoneAccountCreatorStatus {
|
||||
LinphoneAccountCreatorOK,
|
||||
LinphoneAccountCreatorReqFailed,
|
||||
typedef struct _LinphoneAccountCreatorResponseCbs LinphoneAccountCreatorResponseCbs;
|
||||
|
||||
LinphoneAccountCreatorAccountCreated,
|
||||
LinphoneAccountCreatorAccountNotCreated,
|
||||
/**
|
||||
* Enum describing Phone number checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphonePhoneNumberCheck {
|
||||
LinphonePhoneNumberOk = 0x1, /**< Phone number ok */
|
||||
LinphonePhoneNumberTooShort = 0x2, /**< Phone number too short */
|
||||
LinphonePhoneNumberTooLong = 0x4, /**< Phone number too long */
|
||||
LinphonePhoneNumberCountryCodeInvalid = 0x8, /**< Country code invalid */
|
||||
LinphonePhoneNumberInvalid = 0x10, /**< Phone number invalid */
|
||||
} LinphonePhoneNumberCheck;
|
||||
|
||||
LinphoneAccountCreatorAccountExist,
|
||||
LinphoneAccountCreatorAccountExistWithAlias,
|
||||
LinphoneAccountCreatorAccountNotExist,
|
||||
/**
|
||||
* A mask of #LinphonePhoneNumberCheck values
|
||||
* @ingroup account_creator_checking
|
||||
*/
|
||||
typedef unsigned int LinphonePhoneNumberMask;
|
||||
|
||||
LinphoneAccountCreatorAccountActivated,
|
||||
LinphoneAccountCreatorAccountAlreadyActivated,
|
||||
LinphoneAccountCreatorAccountNotActivated,
|
||||
/**
|
||||
* Enum describing Username checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphoneUsernameCheck {
|
||||
LinphoneUsernameOk, /**< Username ok */
|
||||
LinphoneUsernameTooShort, /**< Username too short */
|
||||
LinphoneUsernameTooLong, /**< Username too long */
|
||||
LinphoneUsernameInvalidCharacters, /**< Contain invalid characters */
|
||||
LinphoneUsernameInvalid, /**< Invalid username */
|
||||
} LinphoneUsernameCheck;
|
||||
|
||||
LinphoneAccountCreatorAccountLinked,
|
||||
LinphoneAccountCreatorAccountNotLinked,
|
||||
/**
|
||||
* Enum describing Email checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphoneEmailCheck {
|
||||
LinphoneEmailOk, /**< Email ok */
|
||||
LinphoneEmailMalformed, /**< Email malformed */
|
||||
LinphoneEmailInvalidCharacters, /**< Contain invalid characters */
|
||||
} LinphoneEmailCheck;
|
||||
|
||||
LinphoneAccountCreatorEmailInvalid,
|
||||
/**
|
||||
* Enum describing Password checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphonePasswordCheck {
|
||||
LinphonePasswordOk, /**< Password ok */
|
||||
LinphonePasswordTooShort, /**< Password too short */
|
||||
LinphonePasswordTooLong, /**< Password too long */
|
||||
LinphonePasswordInvalidCharacters, /**< Contain invalid characters */
|
||||
LinphonePasswordMissingCharacters, /**< Missing specific characters */
|
||||
} LinphonePasswordCheck;
|
||||
|
||||
LinphoneAccountCreatorUsernameInvalid,
|
||||
LinphoneAccountCreatorUsernameTooShort,
|
||||
LinphoneAccountCreatorUsernameTooLong,
|
||||
LinphoneAccountCreatorUsernameInvalidSize,
|
||||
/**
|
||||
* Enum describing language checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphoneLanguageCheck {
|
||||
LinphoneLanguageOk, /**< Language ok */
|
||||
} LinphoneLanguageCheck;
|
||||
|
||||
LinphoneAccountCreatorPhoneNumberInvalid,
|
||||
LinphoneAccountCreatorPhoneNumberTooShort,
|
||||
LinphoneAccountCreatorPhoneNumberTooLong,
|
||||
LinphoneAccountCreatorPhoneNumberUsedAccount,
|
||||
LinphoneAccountCreatorPhoneNumberUsedAlias,
|
||||
LinphoneAccountCreatorPhoneNumberNotUsed,
|
||||
/**
|
||||
* Enum describing Activation code checking.
|
||||
* @ingroup account_creator_checking
|
||||
**/
|
||||
typedef enum _LinphoneActivationCodeCheck {
|
||||
LinphoneActivationCodeOk, /**< Activation code ok */
|
||||
LinphoneActivationCodeTooShort, /**< Activation code too short */
|
||||
LinphoneActivationCodeTooLong, /**< Activation code too long */
|
||||
LinphoneActivationCodeInvalidCharacters, /**< Contain invalid characters */
|
||||
} LinphoneActivationCodeCheck;
|
||||
|
||||
LinphoneAccountCreatorPasswordTooShort,
|
||||
LinphoneAccountCreatorPasswordTooLong,
|
||||
/**
|
||||
* Enum describing the status of server request.
|
||||
* @ingroup account_creator_request
|
||||
**/
|
||||
typedef enum _LinphoneRequestStatus {
|
||||
/** Request status **/
|
||||
LinphoneRequestOk, /**< Request passed */
|
||||
LinphoneRequestFailed, /**< Request failed */
|
||||
LinphoneRequestMissingArguments, /**< Request failed due to missing argument(s) */
|
||||
LinphoneRequestMissingCallbacks, /**< Request failed due to missing callback(s) */
|
||||
|
||||
LinphoneAccountCreatorDomainInvalid,
|
||||
LinphoneAccountCreatorRouteInvalid,
|
||||
LinphoneAccountCreatorDisplayNameInvalid,
|
||||
LinphoneAccountCreatorTransportNotSupported,
|
||||
LinphoneAccountCreatorCountryCodeInvalid,
|
||||
/** Account status **/
|
||||
/* Creation */
|
||||
LinphoneRequestAccountCreated, /**< Account created */
|
||||
LinphoneRequestAccountNotCreated, /**< Account not created */
|
||||
/* Existence */
|
||||
LinphoneRequestAccountExist, /**< Account exist */
|
||||
LinphoneRequestAccountExistWithAlias, /**< Account exist with alias */
|
||||
LinphoneRequestAccountNotExist, /**< Account not exist */
|
||||
LinphoneRequestAliasIsAccount, /**< Account was created with Alias */
|
||||
LinphoneRequestAliasExist, /**< Alias exist */
|
||||
LinphoneRequestAliasNotExist, /**< Alias not exist */
|
||||
/* Activation */
|
||||
LinphoneRequestAccountActivated, /**< Account activated */
|
||||
LinphoneRequestAccountAlreadyActivated, /**< Account already activated */
|
||||
LinphoneRequestAccountNotActivated, /**< Account not activated */
|
||||
/* Linking */
|
||||
LinphoneRequestAccountLinked, /**< Account linked */
|
||||
LinphoneRequestAccountNotLinked, /**< Account not linked */
|
||||
|
||||
LinphoneAccountCreatorErrorServer,
|
||||
} LinphoneAccountCreatorStatus;
|
||||
/** Server **/
|
||||
LinphoneRequestErrorServer, /**< Error server */
|
||||
} LinphoneRequestStatus;
|
||||
|
||||
struct SalAddress;
|
||||
|
||||
|
|
@ -227,8 +290,8 @@ typedef enum _LinphoneCallState{
|
|||
LinphoneCallIncomingEarlyMedia, /**< We are proposing early media to an incoming call */
|
||||
LinphoneCallUpdating, /**< A call update has been initiated by us */
|
||||
LinphoneCallReleased, /**< The call object is no more retained by the core */
|
||||
LinphoneCallEarlyUpdatedByRemote, /*< The call is updated by remote while not yet answered (early dialog SIP UPDATE received) */
|
||||
LinphoneCallEarlyUpdating /*< We are updating the call while not yet answered (early dialog SIP UPDATE sent) */
|
||||
LinphoneCallEarlyUpdatedByRemote, /**< The call is updated by remote while not yet answered (early dialog SIP UPDATE received) */
|
||||
LinphoneCallEarlyUpdating /**< We are updating the call while not yet answered (early dialog SIP UPDATE sent) */
|
||||
} LinphoneCallState;
|
||||
|
||||
/**
|
||||
|
|
@ -362,8 +425,9 @@ typedef unsigned int LinphoneContactSearchID;
|
|||
/**
|
||||
* Old name of LinphoneContactSearchID
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef LinphoneContactSearchID ContactSearchID;
|
||||
LINPHONE_DEPRECATED typedef LinphoneContactSearchID ContactSearchID;
|
||||
|
||||
/**
|
||||
* The LinphoneContent object holds data that can be embedded in a signaling message.
|
||||
|
|
@ -428,6 +492,7 @@ typedef struct _LinphoneFactory LinphoneFactory;
|
|||
* Policy to use to pass through firewalls.
|
||||
* @ingroup network_parameters
|
||||
* @deprecated Use #LinphoneNatPolicy instead.
|
||||
* @donotwrap
|
||||
**/
|
||||
typedef enum _LinphoneFirewallPolicy {
|
||||
LinphonePolicyNoFirewall, /**< Do not use any mechanism to pass through firewalls */
|
||||
|
|
@ -590,6 +655,7 @@ typedef struct _LinphoneNatPolicy LinphoneNatPolicy;
|
|||
/**
|
||||
* Enum describing remote friend status
|
||||
* @deprecated Use #LinphonePresenceModel and #LinphonePresenceActivity instead
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef enum _LinphoneOnlineStatus{
|
||||
LinphoneStatusOffline, /**< Offline */
|
||||
|
|
@ -912,8 +978,9 @@ typedef struct _LinphoneSipTransports {
|
|||
/**
|
||||
* Old name of LinphoneSipTransports
|
||||
* @deprecated
|
||||
* @donotwrap
|
||||
*/
|
||||
typedef struct _LinphoneSipTransports LCSipTransports;
|
||||
LINPHONE_DEPRECATED typedef struct _LinphoneSipTransports LCSipTransports;
|
||||
|
||||
typedef struct _LinphoneSoundDaemon LinphoneSoundDaemon;
|
||||
|
||||
|
|
@ -1100,4 +1167,14 @@ typedef enum _LinphoneXmlRpcStatus {
|
|||
typedef struct _LsdPlayer LsdPlayer;
|
||||
|
||||
|
||||
/**
|
||||
* Structure describing a range of integers
|
||||
* @ingroup misc
|
||||
*/
|
||||
typedef struct _LinphoneIntRange {
|
||||
int min; /**< Minimum value */
|
||||
int max; /**< Maximum value */
|
||||
} LinphoneIntRange;
|
||||
|
||||
|
||||
#endif /* LINPHONE_TYPES_H_ */
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ extern "C"
|
|||
* Creates a LinphoneVcard object that has a pointer to an empty vCard
|
||||
* @return a new LinphoneVcard object
|
||||
* @deprecated Use linphone_factory_create_vcard() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneVcard* linphone_vcard_new(void);
|
||||
|
||||
|
|
@ -48,6 +49,7 @@ LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneVcard* linphone_vcard_new(void);
|
|||
* Deletes a LinphoneVcard object properly
|
||||
* @param[in] vCard the LinphoneVcard to destroy
|
||||
* @deprecated Use linphone_vcard_unref() or belle_sip_object_unref() instead.
|
||||
* @donotwrap
|
||||
*/
|
||||
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_vcard_free(LinphoneVcard *vCard);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,30 @@ LINPHONE_PUBLIC void linphone_chat_message_resend(LinphoneChatMessage *msg);
|
|||
*/
|
||||
LINPHONE_PUBLIC void *linphone_vcard_get_belcard(LinphoneVcard *vcard);
|
||||
|
||||
|
||||
|
||||
/* Functions to mainpulate the LinphoneIntRange structure */
|
||||
|
||||
/**
|
||||
* Get the minimum value of a #LinphoneIntRange.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_int_range_get_min(const LinphoneIntRange *range);
|
||||
|
||||
/**
|
||||
* Get the maximum value of a #LinphoneIntRange.
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_int_range_get_max(const LinphoneIntRange *range);
|
||||
|
||||
/**
|
||||
* Set the minimum value of a #LinphoneIntRange.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_int_range_set_min(LinphoneIntRange *range, int min);
|
||||
|
||||
/**
|
||||
* Set the maximum value of a #LinphoneIntRange.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_int_range_set_max(LinphoneIntRange *range, int max);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -43,19 +43,19 @@ typedef void (*LinphoneXmlRpcRequestCbsResponseCb)(LinphoneXmlRpcRequest *reques
|
|||
|
||||
/**
|
||||
* Create a new LinphoneXmlRpcRequest object.
|
||||
* @param[in] method The XML-RPC method to call.
|
||||
* @param[in] return_type The expected XML-RPC response type.
|
||||
* @param[in] method The XML-RPC method to call.
|
||||
* @return A new LinphoneXmlRpcRequest object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type);
|
||||
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method);
|
||||
|
||||
/**
|
||||
* Create a new LinphoneXmlRpcRequest object giving the arguments to the method call.
|
||||
* @param[in] method The XML-RPC method to call.
|
||||
* @param[in] return_type The expected XML-RPC response type.
|
||||
* @param[in] method The XML-RPC method to call.
|
||||
* @return A new LinphoneXmlRpcRequest object.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(const char *method, LinphoneXmlRpcArgType return_type, ...);
|
||||
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgType return_type, const char *method, ...);
|
||||
|
||||
/**
|
||||
* Acquire a reference to the XML-RPC request.
|
||||
|
|
|
|||
|
|
@ -23,68 +23,263 @@ import org.linphone.core.LinphoneAddress.TransportType;
|
|||
|
||||
public interface LinphoneAccountCreator {
|
||||
interface LinphoneAccountCreatorListener {
|
||||
void onAccountCreatorIsAccountUsed(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorAccountCreated(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorAccountActivated(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorAccountLinkedWithPhoneNumber(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorPhoneNumberLinkActivated(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorIsAccountActivated(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorPhoneAccountRecovered(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorIsAccountLinked(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorIsPhoneNumberUsed(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorPasswordUpdated(LinphoneAccountCreator accountCreator, Status status);
|
||||
void onAccountCreatorIsAccountUsed(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorAccountCreated(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorAccountActivated(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorAccountLinkedWithPhoneNumber(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorPhoneNumberLinkActivated(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorIsAccountActivated(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorPhoneAccountRecovered(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorIsAccountLinked(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorIsPhoneNumberUsed(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
void onAccountCreatorPasswordUpdated(LinphoneAccountCreator accountCreator, RequestStatus RequestStatus);
|
||||
}
|
||||
|
||||
public static class Status {
|
||||
static private Vector<Status> values = new Vector<Status>();
|
||||
public static class UsernameCheck {
|
||||
static private Vector<UsernameCheck> values = new Vector<UsernameCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static Status Ok = new Status(0, "Ok");
|
||||
public final static Status Failed = new Status(1, "Failed");
|
||||
public final static Status AccountCreated = new Status(2, "AccountCreated");
|
||||
public final static Status AccountNotCreated = new Status(3, "AccountNotCreated");
|
||||
public final static Status AccountExist = new Status(4, "AccountExist");
|
||||
public final static Status AccountExistWithAlias = new Status(5, "AccountExistWithAlias");
|
||||
public final static Status AccountNotExist = new Status(6, "AccountNotExist");
|
||||
public final static Status AccountActivated = new Status(7, "AccountActivated");
|
||||
public final static Status AccountAlreadyActivated = new Status(8, "AccountAlreadyActivated");
|
||||
public final static Status AccountNotActivated = new Status(9, "AccountNotActivated");
|
||||
public final static Status AccountLinked = new Status(10, "AccountLinked");
|
||||
public final static Status AccountNotLinked = new Status(11, "AccountNotLinked");
|
||||
public final static Status EmailInvalid = new Status(12, "EmailInvalid");
|
||||
public final static Status UsernameInvalid = new Status(13, "UsernameInvalid");
|
||||
public final static Status UsernameTooShort = new Status(14, "UsernameTooShort");
|
||||
public final static Status UsernameTooLong = new Status(15, "UsernameTooLong");
|
||||
public final static Status UsernameInvalidSize = new Status(16, "UsernameInvalidSize");
|
||||
public final static Status PhoneNumberInvalid = new Status(17, "PhoneNumberInvalid");
|
||||
public final static Status PhoneNumberTooShort = new Status(18, "PhoneNumberTooShort");
|
||||
public final static Status PhoneNumberTooLong = new Status(19, "PhoneNumberTooLong");
|
||||
public final static Status PhoneNumberUsedAccount = new Status(20, "PhoneNumberUsed");
|
||||
public final static Status PhoneNumberUsedAlias = new Status(21, "PhoneNumberUsed");
|
||||
public final static Status PhoneNumberNotUsed = new Status(22, "PhoneNumberNotUsed");
|
||||
public final static Status PasswordTooShort = new Status(23, "PasswordTooShort");
|
||||
public final static Status PasswordTooLong = new Status(24, "PasswordTooLong");
|
||||
public final static Status DomainInvalid = new Status(25, "DomainInvalid");
|
||||
public final static Status RouteInvalid = new Status(26, "RouteInvalid");
|
||||
public final static Status DisplayNameInvalid = new Status(27, "DisplayNameInvalid");
|
||||
public final static Status TransportNotSupported = new Status(28, "TransportNotSupported");
|
||||
public final static Status CountryCodeInvalid = new Status(29, "CountryCodeInvalid");
|
||||
public final static Status ErrorServer = new Status(30, "ErrorServer");
|
||||
public final static UsernameCheck Ok = new UsernameCheck(0, "Ok");
|
||||
public final static UsernameCheck TooShort = new UsernameCheck(1, "TooShort");
|
||||
public final static UsernameCheck TooLong = new UsernameCheck(2, "TooLong");
|
||||
public final static UsernameCheck InvalidCharacters = new UsernameCheck(3, "InvalidCharacters");
|
||||
public final static UsernameCheck Invalid = new UsernameCheck(4, "Invalid");
|
||||
|
||||
private Status(int value, String stringValue) {
|
||||
private UsernameCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static Status fromInt(int value) {
|
||||
public static UsernameCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
Status state = (Status) values.elementAt(i);
|
||||
UsernameCheck state = (UsernameCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("Status not found [" + value + "]");
|
||||
throw new RuntimeException("UsernameCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PhoneNumberCheck {
|
||||
static private Vector<PhoneNumberCheck> values = new Vector<PhoneNumberCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static PhoneNumberCheck Ok = new PhoneNumberCheck(0x1, "Ok");
|
||||
public final static PhoneNumberCheck TooShort = new PhoneNumberCheck(0x2, "TooShort");
|
||||
public final static PhoneNumberCheck TooLong = new PhoneNumberCheck(0x4, "TooLong");
|
||||
public final static PhoneNumberCheck CountryCodeInvalid = new PhoneNumberCheck(0x8, "CountryCodeInvalid");
|
||||
public final static PhoneNumberCheck Invalid = new PhoneNumberCheck(0x10, "Invalid");
|
||||
|
||||
private PhoneNumberCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static PhoneNumberCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
PhoneNumberCheck state = (PhoneNumberCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("UsernameCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class EmailCheck {
|
||||
static private Vector<EmailCheck> values = new Vector<EmailCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static EmailCheck Ok = new EmailCheck(0, "Ok");
|
||||
public final static EmailCheck Malformed = new EmailCheck(1, "Malformed");
|
||||
public final static EmailCheck InvalidCharacters = new EmailCheck(2, "InvalidCharacters");
|
||||
|
||||
private EmailCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static EmailCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
EmailCheck state = (EmailCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("EmailCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PasswordCheck {
|
||||
static private Vector<PasswordCheck> values = new Vector<PasswordCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static PasswordCheck Ok = new PasswordCheck(0, "Ok");
|
||||
public final static PasswordCheck TooShort = new PasswordCheck(1, "TooShort");
|
||||
public final static PasswordCheck TooLong = new PasswordCheck(2, "TooLong");
|
||||
public final static PasswordCheck InvalidCharacters = new PasswordCheck(3, "InvalidCharacters");
|
||||
public final static PasswordCheck MissingCharacters = new PasswordCheck(4, "MissingCharacters");
|
||||
|
||||
private PasswordCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static PasswordCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
PasswordCheck state = (PasswordCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("PasswordCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LanguageCheck {
|
||||
static private Vector<LanguageCheck> values = new Vector<LanguageCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static LanguageCheck Ok = new LanguageCheck(0, "Ok");
|
||||
|
||||
private LanguageCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static LanguageCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
LanguageCheck state = (LanguageCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("LanguageCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ActivationCodeCheck {
|
||||
static private Vector<ActivationCodeCheck> values = new Vector<ActivationCodeCheck>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static ActivationCodeCheck Ok = new ActivationCodeCheck(0, "Ok");
|
||||
public final static ActivationCodeCheck TooShort = new ActivationCodeCheck(1, "TooShort");
|
||||
public final static ActivationCodeCheck TooLong = new ActivationCodeCheck(2, "TooLong");
|
||||
public final static ActivationCodeCheck InvalidCharacters = new ActivationCodeCheck(3, "InvalidCharacters");
|
||||
|
||||
private ActivationCodeCheck(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static ActivationCodeCheck fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
ActivationCodeCheck state = (ActivationCodeCheck) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("ActivationCodeCheck not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class RequestStatus {
|
||||
static private Vector<RequestStatus> values = new Vector<RequestStatus>();
|
||||
private final int mValue;
|
||||
private final String mStringValue;
|
||||
public final int value() { return mValue; }
|
||||
|
||||
public final static RequestStatus Ok = new RequestStatus(0, "Ok");
|
||||
public final static RequestStatus Failed = new RequestStatus(1, "Failed");
|
||||
public final static RequestStatus MissingArguments = new RequestStatus(2, "MissingArguments");
|
||||
public final static RequestStatus MissingCallbacks = new RequestStatus(3, "MissingCallbacks");
|
||||
|
||||
public final static RequestStatus AccountCreated = new RequestStatus(4, "AccountCreated");
|
||||
public final static RequestStatus AccountNotCreated = new RequestStatus(5, "AccountNotCreated");
|
||||
|
||||
public final static RequestStatus AccountExist = new RequestStatus(6, "AccountExist");
|
||||
public final static RequestStatus AccountExistWithAlias = new RequestStatus(7, "AccountExistWithAlias");
|
||||
public final static RequestStatus AccountNotExist = new RequestStatus(8, "AccountNotExist");
|
||||
public final static RequestStatus AliasIsAccount = new RequestStatus(9, "AliasIsAccount");
|
||||
public final static RequestStatus AliasExist = new RequestStatus(10, "AliasExist");
|
||||
public final static RequestStatus AliasNotExist = new RequestStatus(11, "AliasNotExist");
|
||||
|
||||
public final static RequestStatus AccountActivated = new RequestStatus(12, "AccountActivated");
|
||||
public final static RequestStatus AccountAlreadyActivated = new RequestStatus(13, "AccountAlreadyActivated");
|
||||
public final static RequestStatus AccountNotActivated = new RequestStatus(14, "AccountNotActivated");
|
||||
|
||||
public final static RequestStatus AccountLinked = new RequestStatus(15, "AccountLinked");
|
||||
public final static RequestStatus AccountNotLinked = new RequestStatus(16, "AccountNotLinked");
|
||||
|
||||
public final static RequestStatus ErrorServer = new RequestStatus(17, "ErrorServer");
|
||||
|
||||
private RequestStatus(int value, String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue = stringValue;
|
||||
}
|
||||
|
||||
public static RequestStatus fromInt(int value) {
|
||||
for (int i=0; i < values.size(); i++) {
|
||||
RequestStatus state = (RequestStatus) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("RequestStatus not found [" + value + "]");
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
|
@ -98,67 +293,53 @@ public interface LinphoneAccountCreator {
|
|||
|
||||
void setListener(LinphoneAccountCreatorListener listener);
|
||||
|
||||
Status setUsername(String username);
|
||||
UsernameCheck setUsername(String username);
|
||||
|
||||
String getUsername();
|
||||
|
||||
Status setPhoneNumber(String phoneNumber, String countryCode);
|
||||
int setPhoneNumber(String phoneNumber, String countryCode);
|
||||
|
||||
String getPhoneNumber();
|
||||
|
||||
Status setPassword(String password);
|
||||
PasswordCheck setPassword(String password);
|
||||
|
||||
String getPassword();
|
||||
|
||||
Status setHa1(String ha1);
|
||||
PasswordCheck setHa1(String ha1);
|
||||
|
||||
String getHa1();
|
||||
|
||||
Status setActivationCode(String activationCode);
|
||||
ActivationCodeCheck setActivationCode(String activationCode);
|
||||
|
||||
Status setLanguage(String lang);
|
||||
LanguageCheck setLanguage(String lang);
|
||||
|
||||
Status setTransport(TransportType transport);
|
||||
|
||||
TransportType getTransport();
|
||||
|
||||
Status setDomain(String domain);
|
||||
|
||||
String getDomain();
|
||||
|
||||
Status setRoute(String route);
|
||||
|
||||
String getRoute();
|
||||
|
||||
Status setDisplayName(String displayName);
|
||||
UsernameCheck setDisplayName(String displayName);
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
Status setEmail(String email);
|
||||
EmailCheck setEmail(String email);
|
||||
|
||||
String getEmail();
|
||||
|
||||
String getPrefix(String phone);
|
||||
|
||||
Status isAccountUsed();
|
||||
RequestStatus isAccountUsed();
|
||||
|
||||
Status createAccount();
|
||||
RequestStatus createAccount();
|
||||
|
||||
Status activateAccount();
|
||||
RequestStatus activateAccount();
|
||||
|
||||
Status isAccountActivated();
|
||||
RequestStatus isAccountActivated();
|
||||
|
||||
Status linkPhoneNumberWithAccount();
|
||||
RequestStatus linkPhoneNumberWithAccount();
|
||||
|
||||
Status activatePhoneNumberLink();
|
||||
RequestStatus activatePhoneNumberLink();
|
||||
|
||||
Status isAccountLinked();
|
||||
RequestStatus isAccountLinked();
|
||||
|
||||
Status isPhoneNumberUsed();
|
||||
RequestStatus isPhoneNumberUsed();
|
||||
|
||||
Status recoverPhoneAccount();
|
||||
RequestStatus recoverPhoneAccount();
|
||||
|
||||
Status updatePassword(String newPassword);
|
||||
|
||||
LinphoneProxyConfig configure();
|
||||
RequestStatus updatePassword(String newPassword);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
package org.linphone.core;
|
||||
|
||||
import org.linphone.core.LinphoneAddress.TransportType;
|
||||
|
||||
public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
||||
protected long nativePtr;
|
||||
|
||||
|
|
@ -48,8 +46,8 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setUsername(long ptr, String username);
|
||||
@Override
|
||||
public Status setUsername(String username) {
|
||||
return Status.fromInt(setUsername(nativePtr, username));
|
||||
public UsernameCheck setUsername(String username) {
|
||||
return UsernameCheck.fromInt(setUsername(nativePtr, username));
|
||||
}
|
||||
|
||||
private native String getUsername(long ptr);
|
||||
|
|
@ -60,8 +58,8 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setPhoneNumber(long ptr, String phoneNumber, String countryCode);
|
||||
@Override
|
||||
public Status setPhoneNumber(String phoneNumber, String countryCode) {
|
||||
return Status.fromInt(setPhoneNumber(nativePtr, phoneNumber, countryCode));
|
||||
public int setPhoneNumber(String phoneNumber, String countryCode) {
|
||||
return setPhoneNumber(nativePtr, phoneNumber, countryCode);
|
||||
}
|
||||
|
||||
private native String getPhoneNumber(long ptr);
|
||||
|
|
@ -72,8 +70,8 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setPassword(long ptr, String password);
|
||||
@Override
|
||||
public Status setPassword(String password) {
|
||||
return Status.fromInt(setPassword(nativePtr, password));
|
||||
public PasswordCheck setPassword(String password) {
|
||||
return PasswordCheck.fromInt(setPassword(nativePtr, password));
|
||||
}
|
||||
|
||||
private native String getPassword(long ptr);
|
||||
|
|
@ -84,8 +82,8 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setHa1(long ptr, String ha1);
|
||||
@Override
|
||||
public Status setHa1(String ha1) {
|
||||
return Status.fromInt(setHa1(nativePtr, ha1));
|
||||
public PasswordCheck setHa1(String ha1) {
|
||||
return PasswordCheck.fromInt(setHa1(nativePtr, ha1));
|
||||
}
|
||||
|
||||
private native String getHa1(long ptr);
|
||||
|
|
@ -96,56 +94,20 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setActivationCode(long ptr, String activationCode);
|
||||
@Override
|
||||
public Status setActivationCode(String activationCode) {
|
||||
return Status.fromInt(setActivationCode(nativePtr, activationCode));
|
||||
public ActivationCodeCheck setActivationCode(String activationCode) {
|
||||
return ActivationCodeCheck.fromInt(setActivationCode(nativePtr, activationCode));
|
||||
}
|
||||
|
||||
private native int setLanguage(long ptr, String lang);
|
||||
@Override
|
||||
public Status setLanguage(String lang) {
|
||||
return Status.fromInt(setLanguage(nativePtr, lang));
|
||||
}
|
||||
|
||||
private native int setTransport(long ptr, int transport);
|
||||
@Override
|
||||
public Status setTransport(TransportType transport) {
|
||||
return Status.fromInt(setTransport(nativePtr, transport.toInt()));
|
||||
}
|
||||
|
||||
private native int getTransport(long ptr);
|
||||
@Override
|
||||
public TransportType getTransport() {
|
||||
return TransportType.fromInt(getTransport(nativePtr));
|
||||
}
|
||||
|
||||
private native int setDomain(long ptr, String domain);
|
||||
@Override
|
||||
public Status setDomain(String domain) {
|
||||
return Status.fromInt(setDomain(nativePtr, domain));
|
||||
}
|
||||
|
||||
private native String getDomain(long ptr);
|
||||
@Override
|
||||
public String getDomain() {
|
||||
return getDomain(nativePtr);
|
||||
}
|
||||
|
||||
private native int setRoute(long ptr, String route);
|
||||
@Override
|
||||
public Status setRoute(String route) {
|
||||
return Status.fromInt(setRoute(nativePtr, route));
|
||||
}
|
||||
|
||||
private native String getRoute(long ptr);
|
||||
@Override
|
||||
public String getRoute() {
|
||||
return getRoute(nativePtr);
|
||||
public LanguageCheck setLanguage(String lang) {
|
||||
return LanguageCheck.fromInt(setLanguage(nativePtr, lang));
|
||||
}
|
||||
|
||||
private native int setDisplayName(long ptr, String displayName);
|
||||
@Override
|
||||
public Status setDisplayName(String displayName) {
|
||||
return Status.fromInt(setDisplayName(nativePtr, displayName));
|
||||
public UsernameCheck setDisplayName(String displayName) {
|
||||
return UsernameCheck.fromInt(setDisplayName(nativePtr, displayName));
|
||||
}
|
||||
|
||||
private native String getDisplayName(long ptr);
|
||||
|
|
@ -156,8 +118,8 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int setEmail(long ptr, String email);
|
||||
@Override
|
||||
public Status setEmail(String email) {
|
||||
return Status.fromInt(setEmail(nativePtr, email));
|
||||
public EmailCheck setEmail(String email) {
|
||||
return EmailCheck.fromInt(setEmail(nativePtr, email));
|
||||
}
|
||||
|
||||
private native String getEmail(long ptr);
|
||||
|
|
@ -174,67 +136,61 @@ public class LinphoneAccountCreatorImpl implements LinphoneAccountCreator {
|
|||
|
||||
private native int isAccountUsed(long ptr);
|
||||
@Override
|
||||
public Status isAccountUsed() {
|
||||
return Status.fromInt(isAccountUsed(nativePtr));
|
||||
public RequestStatus isAccountUsed() {
|
||||
return RequestStatus.fromInt(isAccountUsed(nativePtr));
|
||||
}
|
||||
|
||||
private native int createAccount(long ptr);
|
||||
@Override
|
||||
public Status createAccount() {
|
||||
return Status.fromInt(createAccount(nativePtr));
|
||||
public RequestStatus createAccount() {
|
||||
return RequestStatus.fromInt(createAccount(nativePtr));
|
||||
}
|
||||
|
||||
private native int activateAccount(long ptr);
|
||||
@Override
|
||||
public Status activateAccount() {
|
||||
return Status.fromInt(activateAccount(nativePtr));
|
||||
public RequestStatus activateAccount() {
|
||||
return RequestStatus.fromInt(activateAccount(nativePtr));
|
||||
}
|
||||
|
||||
private native int isAccountLinked(long ptr);
|
||||
@Override
|
||||
public Status isAccountLinked() {
|
||||
return Status.fromInt(isAccountLinked(nativePtr));
|
||||
public RequestStatus isAccountLinked() {
|
||||
return RequestStatus.fromInt(isAccountLinked(nativePtr));
|
||||
}
|
||||
|
||||
private native int isPhoneNumberUsed(long ptr);
|
||||
@Override
|
||||
public Status isPhoneNumberUsed() {
|
||||
return Status.fromInt(isPhoneNumberUsed(nativePtr));
|
||||
public RequestStatus isPhoneNumberUsed() {
|
||||
return RequestStatus.fromInt(isPhoneNumberUsed(nativePtr));
|
||||
}
|
||||
|
||||
private native int isAccountActivated(long ptr);
|
||||
@Override
|
||||
public Status isAccountActivated() {
|
||||
return Status.fromInt(isAccountActivated(nativePtr));
|
||||
public RequestStatus isAccountActivated() {
|
||||
return RequestStatus.fromInt(isAccountActivated(nativePtr));
|
||||
}
|
||||
|
||||
private native int linkPhoneNumberWithAccount(long ptr);
|
||||
@Override
|
||||
public Status linkPhoneNumberWithAccount() {
|
||||
return Status.fromInt(linkPhoneNumberWithAccount(nativePtr));
|
||||
public RequestStatus linkPhoneNumberWithAccount() {
|
||||
return RequestStatus.fromInt(linkPhoneNumberWithAccount(nativePtr));
|
||||
}
|
||||
|
||||
private native int activatePhoneNumberLink(long ptr);
|
||||
@Override
|
||||
public Status activatePhoneNumberLink() {
|
||||
return Status.fromInt(activatePhoneNumberLink(nativePtr));
|
||||
public RequestStatus activatePhoneNumberLink() {
|
||||
return RequestStatus.fromInt(activatePhoneNumberLink(nativePtr));
|
||||
}
|
||||
|
||||
private native int recoverPhoneAccount(long ptr);
|
||||
@Override
|
||||
public Status recoverPhoneAccount() {
|
||||
return Status.fromInt(recoverPhoneAccount(nativePtr));
|
||||
public RequestStatus recoverPhoneAccount() {
|
||||
return RequestStatus.fromInt(recoverPhoneAccount(nativePtr));
|
||||
}
|
||||
|
||||
private native int updatePassword(long ptr, String newPassword);
|
||||
@Override
|
||||
public Status updatePassword(String newPassword) {
|
||||
return Status.fromInt(updatePassword(nativePtr, newPassword));
|
||||
}
|
||||
|
||||
private native LinphoneProxyConfig configure(long ptr);
|
||||
@Override
|
||||
public LinphoneProxyConfig configure() {
|
||||
return configure(nativePtr);
|
||||
public RequestStatus updatePassword(String newPassword) {
|
||||
return RequestStatus.fromInt(updatePassword(nativePtr, newPassword));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ set(CERTIFICATE_CLIENT_FILES
|
|||
set(CERTIFICATE_FILES ${CERTIFICATE_ALT_FILES} ${CERTIFICATE_CN_FILES} ${CERTIFICATE_CLIENT_FILES})
|
||||
|
||||
set(RC_FILES
|
||||
rcfiles/account_creator_rc
|
||||
rcfiles/carddav_rc
|
||||
rcfiles/conference_focus_rc
|
||||
rcfiles/empty_rc
|
||||
|
|
@ -159,6 +160,7 @@ set(IOS_RESOURCES_FILES
|
|||
|
||||
set(SOURCE_FILES_C
|
||||
accountmanager.c
|
||||
account_creator_tester.c
|
||||
audio_bypass_tester.c
|
||||
call_multicast_tester.c
|
||||
call_multi_tester.c
|
||||
|
|
|
|||
|
|
@ -34,7 +34,10 @@ CERTIFICATE_CLIENT_FILES = certificates/client/cert.pem \
|
|||
CERTIFICATE_FILES = $(CERTIFICATE_ALT_FILES) $(CERTIFICATE_CN_FILES) $(CERTIFICATE_CLIENT_FILES)
|
||||
|
||||
RCFILES = \
|
||||
rcfiles/account_creator_rc\
|
||||
rcfiles/carddav_rc\
|
||||
rcfiles/empty_rc\
|
||||
rcfiles/friends_rc\
|
||||
rcfiles/laure_call_logs_rc\
|
||||
rcfiles/laure_rc_udp\
|
||||
rcfiles/marie_early_rc\
|
||||
|
|
@ -75,8 +78,7 @@ RCFILES = \
|
|||
rcfiles/stun_rc\
|
||||
rcfiles/upnp_rc\
|
||||
rcfiles/zero_length_params_rc\
|
||||
rcfiles/friends_rc\
|
||||
rcfiles/carddav_rc
|
||||
|
||||
|
||||
IMAGE_FILES = images/linphone.svg images/nowebcamCIF.jpg images/nowebcamVGA.jpg
|
||||
|
||||
|
|
@ -122,6 +124,7 @@ liblinphonetester_la_HEADERS = audio_bypass_wav_header.h
|
|||
|
||||
liblinphonetester_la_SOURCES = \
|
||||
accountmanager.c \
|
||||
account_creator_tester.c \
|
||||
audio_bypass_tester.c \
|
||||
call_multi_tester.c \
|
||||
call_multicast_tester.c \
|
||||
|
|
|
|||
2351
tester/account_creator_tester.c
Normal file
2351
tester/account_creator_tester.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -61,6 +61,7 @@ extern test_suite_t video_test_suite;
|
|||
extern test_suite_t multicast_call_test_suite;
|
||||
extern test_suite_t multi_call_test_suite;
|
||||
extern test_suite_t proxy_config_test_suite;
|
||||
extern test_suite_t account_creator_test_suite;
|
||||
#ifdef VCARD_ENABLED
|
||||
extern test_suite_t vcard_test_suite;
|
||||
#endif
|
||||
|
|
|
|||
13
tester/rcfiles/account_creator_rc
Normal file
13
tester/rcfiles/account_creator_rc
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[assistant]
|
||||
domain=sip.accounttest.org
|
||||
password_max_length=12
|
||||
password_min_length=3
|
||||
username_max_length=14
|
||||
username_min_length=3
|
||||
username_regex=^[A-Za-z0-9_.\-]*$
|
||||
xmlrpc_url=https://sip2.linphone.org:446/wizard.php
|
||||
|
||||
[proxy_default_values]
|
||||
reg_proxy=<sip:sip2.linphone.org:5072>
|
||||
realm=sip.accounttest.org
|
||||
reg_identity=sip:user@sip.accounttest.org
|
||||
|
|
@ -419,7 +419,7 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
|
|||
|
||||
LinphoneCoreManager* linphone_core_manager_new3(const char* rc_file, int check_for_proxies, const char* phone_alias) {
|
||||
LinphoneCoreManager *manager = ms_new0(LinphoneCoreManager, 1);
|
||||
|
||||
|
||||
linphone_core_manager_init(manager, rc_file, phone_alias);
|
||||
linphone_core_manager_start(manager, check_for_proxies);
|
||||
return manager;
|
||||
|
|
@ -560,6 +560,7 @@ void liblinphone_tester_add_suites() {
|
|||
bc_tester_add_suite(&message_test_suite);
|
||||
bc_tester_add_suite(&presence_test_suite);
|
||||
bc_tester_add_suite(&presence_server_test_suite);
|
||||
bc_tester_add_suite(&account_creator_test_suite);
|
||||
#ifdef UPNP
|
||||
bc_tester_add_suite(&upnp_test_suite);
|
||||
#endif
|
||||
|
|
@ -895,5 +896,6 @@ LinphoneConferenceServer* linphone_conference_server_new(const char *rc_file, bo
|
|||
}
|
||||
|
||||
void linphone_conference_server_destroy(LinphoneConferenceServer *conf_srv) {
|
||||
linphone_core_cbs_unref(conf_srv->cbs);
|
||||
linphone_core_manager_destroy((LinphoneCoreManager *)conf_srv);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,6 +304,9 @@ class Project:
|
|||
descriptionNode.tag = 'description'
|
||||
descriptionNode.attrib = {}
|
||||
return descriptionNode
|
||||
|
||||
def __canBeWrapped(self, node):
|
||||
return node.find('./detaileddescription//donotwrap') is None
|
||||
|
||||
def __discoverClasses(self):
|
||||
for td in self.__typedefs:
|
||||
|
|
@ -491,6 +494,8 @@ class Project:
|
|||
self.add(td)
|
||||
|
||||
def __parseCFunctionMemberdef(self, node):
|
||||
if not Project.__canBeWrapped(self, node):
|
||||
return None
|
||||
internal = node.find("./detaileddescription/internal")
|
||||
if internal is not None:
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -22,7 +22,14 @@
|
|||
|
||||
add_custom_command(OUTPUT include/linphone++/linphone.hh src/linphone++.cc
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/genwrapper.py" "${PROJECT_BINARY_DIR}/coreapi/help/doc/xml"
|
||||
DEPENDS abstractapi.py genwrapper.py class_header.mustache class_impl.mustache enums_header.mustache main_header.mustache linphone-doc
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/tools/genapixml.py
|
||||
abstractapi.py
|
||||
genwrapper.py
|
||||
class_header.mustache
|
||||
class_impl.mustache
|
||||
enums_header.mustache
|
||||
main_header.mustache
|
||||
linphone-doc
|
||||
"${PROJECT_BINARY_DIR}/coreapi/help/doc/xml/index.xml"
|
||||
)
|
||||
|
||||
|
|
@ -37,8 +44,8 @@ target_link_libraries(linphone++
|
|||
)
|
||||
target_include_directories(linphone++
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
PRIVATE ${CMAKE_BINARY_DIR}/include
|
||||
PRIVATE ${CMAKE_SOURCE_DIR}/include
|
||||
PRIVATE ${PROJECT_BINARY_DIR}/include
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE ${BCTOOLBOX_INCLUDE_DIRS}
|
||||
PRIVATE ${BELLESIP_INCLUDE_DIRS}
|
||||
|
|
|
|||
|
|
@ -433,68 +433,13 @@ class CParser(object):
|
|||
self.cListType = 'bctbx_list_t'
|
||||
self.regexFixedSizeInteger = '^(u?)int(\d?\d)_t$'
|
||||
self.methodBl = ['ref', 'unref', 'new', 'destroy', 'getCurrentCallbacks', 'setUserData', 'getUserData']
|
||||
self.functionBl = ['linphone_tunnel_get_http_proxy',
|
||||
'linphone_core_can_we_add_call',
|
||||
'linphone_core_add_listener',
|
||||
'linphone_core_remove_listener',
|
||||
self.functionBl = [
|
||||
'linphone_core_get_current_callbacks',
|
||||
'linphone_proxy_config_set_file_transfer_server',
|
||||
'linphone_proxy_config_get_file_transfer_server',
|
||||
'linphone_factory_create_core', # manualy wrapped
|
||||
'linphone_factory_create_core_with_config', # manualy wrapped
|
||||
'linphone_buffer_get_content',
|
||||
'linphone_chat_room_send_chat_message', # overloaded
|
||||
'linphone_chat_message_resend', # overloaded
|
||||
'linphone_config_read_relative_file',
|
||||
'linphone_vcard_get_belcard', # manualy wrapped
|
||||
'linphone_chat_room_destroy', # was deprecated when the wrapper generator was made
|
||||
'linphone_chat_room_send_message', # was deprecated when the wrapper generator was made
|
||||
'linphone_chat_room_send_message2', # was deprecated when the wrapper generator was made
|
||||
'linphone_chat_room_get_lc', # was deprecated when the wrapper generator was made
|
||||
'linphone_chat_message_start_file_download', # was deprecated when the wrapper generator was made
|
||||
'linphone_vcard_new', # was deprecated when the wrapper generator was made
|
||||
'linphone_vcard_free', # was deprecated when the wrapper generator was made
|
||||
'linphone_call_params_destroy', # was deprecated when the wrapper generator was made
|
||||
'linphone_address_is_secure', # was deprecated when the wrapper generator was made
|
||||
'linphone_address_destroy', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_enable_logs', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_enable_logs_with_cb', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_disable_logs', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_user_agent_name', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_user_agent_version', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_new', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_new_with_config', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_add_listener', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_remove_listener', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_send_dtmf', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_default_proxy', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_set_firewall_policy', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_firewall_policy', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_ring_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_play_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_rec_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_set_ring_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_set_play_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_set_rec_level', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_mute_mic', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_is_mic_muted', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_enable_video', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_create_lp_config', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_destroy', # was deprecated when the wrapper generator was made
|
||||
'linphone_proxy_config_normalize_number', # was deprecated when the wrapper generator was made
|
||||
'linphone_call_is_in_conference', # was deprecated when the wrapper generator was made
|
||||
'linphone_friend_new', # was deprecated when the wrapper generator was made
|
||||
'linphone_friend_new_with_address', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_sound_source', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_set_sound_source', # was deprecated when the wrapper generator was made
|
||||
'linphone_core_get_sip_transports', # not wrappable
|
||||
'linphone_core_get_sip_transports_used'] # not wrappable
|
||||
'linphone_vcard_get_belcard'] # manualy wrapped
|
||||
|
||||
self.classBl = ['LinphoneImEncryptionEngine',
|
||||
'LinphoneImEncryptionEngineCbs',
|
||||
'LinphoneImNotifPolicy',
|
||||
'LpConfig',
|
||||
'LinphoneErrorInfo',
|
||||
self.classBl = ['LpConfig',
|
||||
'LinphonePayloadType',
|
||||
'LinphonePlayer'] # temporarly blacklisted
|
||||
|
||||
|
|
@ -781,6 +726,7 @@ class CParser(object):
|
|||
elif cType.ctype in self.classesIndex or cType.ctype in self.interfacesIndex:
|
||||
absType = ClassType(cType.ctype)
|
||||
absType.isconst = cType.completeType.startswith('const ')
|
||||
absType.isref = cType.completeType.endswith('*')
|
||||
elif cType.ctype == self.cListType:
|
||||
absType = ListType(cType.containedType)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -274,8 +274,6 @@ class CppTranslator(object):
|
|||
if type(exprtype) is AbsApi.BaseType:
|
||||
if exprtype.name == 'string':
|
||||
cExpr = 'StringUtilities::cppStringToC({0})'.format(cppExpr);
|
||||
elif exprtype.name not in ['void', 'string', 'string_array'] and exprtype.isref:
|
||||
cExpr = '&' + cppExpr
|
||||
else:
|
||||
cExpr = cppExpr
|
||||
elif type(exprtype) is AbsApi.EnumType:
|
||||
|
|
@ -293,7 +291,10 @@ class CppTranslator(object):
|
|||
}
|
||||
cExpr = '(::{cPtrType} *)Object::sharedPtrToCPtr(std::static_pointer_cast<{object},{ptrType}>({cppExpr}))'.format(**param)
|
||||
else:
|
||||
cExpr = '(const ::{_type} *)({expr}).c_struct()'.format(_type=cPtrType, expr=cppExpr)
|
||||
if exprtype.isref:
|
||||
cExpr = '(const ::{_type} *)({expr}).c_struct()'.format(_type=cPtrType, expr=cppExpr)
|
||||
else:
|
||||
cExpr = '*(const ::{_type} *)({expr}).c_struct()'.format(_type=cPtrType, expr=cppExpr)
|
||||
elif type(exprtype) is AbsApi.ListType:
|
||||
if type(exprtype.containedTypeDesc) is AbsApi.BaseType and exprtype.containedTypeDesc.name == 'string':
|
||||
cExpr = 'StringBctbxListWrapper({0}).c_list()'.format(cppExpr)
|
||||
|
|
@ -315,9 +316,7 @@ class CppTranslator(object):
|
|||
|
||||
def _wrap_c_expression_to_cpp(self, cExpr, exprtype, usedNamespace=None):
|
||||
if type(exprtype) is AbsApi.BaseType:
|
||||
if exprtype.name == 'void' and not exprtype.isref:
|
||||
return cExpr
|
||||
elif exprtype.name == 'string':
|
||||
if exprtype.name == 'string':
|
||||
return 'StringUtilities::cStringToCpp({0})'.format(cExpr)
|
||||
elif exprtype.name == 'string_array':
|
||||
return 'StringUtilities::cStringArrayToCppList({0})'.format(cExpr)
|
||||
|
|
@ -338,7 +337,13 @@ class CppTranslator(object):
|
|||
else:
|
||||
return 'Object::cPtrToSharedPtr<{0}>({1})'.format(cppReturnType, cExpr)
|
||||
else:
|
||||
return '{0}({1})'.format(exprtype.desc.name.to_camel_case(), cExpr);
|
||||
if exprtype.isref:
|
||||
return '{0}({1})'.format(exprtype.desc.name.to_camel_case(), cExpr)
|
||||
else:
|
||||
return '{0}(StructWrapper<::{1}>({2}).ptr())'.format(
|
||||
exprtype.desc.name.to_camel_case(),
|
||||
exprtype.desc.name.to_c(),
|
||||
cExpr)
|
||||
elif type(exprtype) is AbsApi.ListType:
|
||||
if type(exprtype.containedTypeDesc) is AbsApi.BaseType and exprtype.containedTypeDesc.name == 'string':
|
||||
return 'StringBctbxListWrapper::bctbxListToCppList({0})'.format(cExpr)
|
||||
|
|
@ -391,6 +396,7 @@ class CppTranslator(object):
|
|||
res = _type.size
|
||||
else:
|
||||
res = 'int{0}_t'.format(_type.size)
|
||||
|
||||
elif _type.name == 'floatant':
|
||||
if _type.size is not None and _type.size == 'double':
|
||||
res = 'double'
|
||||
|
|
@ -418,7 +424,7 @@ class CppTranslator(object):
|
|||
res = 'const ' + res
|
||||
|
||||
if _type.isref:
|
||||
res += ' &'
|
||||
res += ' *'
|
||||
return res
|
||||
|
||||
def translate_enum_type(self, _type, **params):
|
||||
|
|
|
|||
|
|
@ -119,6 +119,20 @@ namespace linphone {
|
|||
static std::list<std::string> cStringArrayToCppList(const char **cArray);
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class StructWrapper {
|
||||
public:
|
||||
StructWrapper(const T &s) {
|
||||
mStruct = s;
|
||||
}
|
||||
const void *ptr() const {
|
||||
return &mStruct;
|
||||
}
|
||||
|
||||
private:
|
||||
T mStruct;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // _TOOLS_HH
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue