Merge branch 'master' into dev_setup_wizard_glade

This commit is contained in:
François Grisez 2015-10-21 19:58:21 +02:00
commit 92202d1dc1
168 changed files with 10227 additions and 6717 deletions

View file

@ -30,7 +30,7 @@ set(LINPHONE_MICRO_VERSION "5")
set(LINPHONE_VERSION "${LINPHONE_MAJOR_VERSION}.${LINPHONE_MINOR_VERSION}.${LINPHONE_MICRO_VERSION}")
set(LINPHONE_SO_VERSION "7")
file(GLOB LINPHONE_PO_FILES RELATIVE "${CMAKE_SOURCE_DIR}/po" "${CMAKE_SOURCE_DIR}/po/*.po")
file(GLOB LINPHONE_PO_FILES RELATIVE "${CMAKE_CURRENT_LIST_DIR}/po" "${CMAKE_CURRENT_LIST_DIR}/po/*.po")
string(REGEX REPLACE "([a-zA-Z_]+)\\.po" "\\1" LINPHONE_ALL_LANGS_LIST "${LINPHONE_PO_FILES}")
string(REPLACE ";" " " LINPHONE_ALL_LANGS "${LINPHONE_ALL_LANGS_LIST}")
@ -42,6 +42,7 @@ option(ENABLE_DATE "Use build date in internal version number." NO)
option(ENABLE_DOC "Enable documentation generation with Doxygen." YES)
option(ENABLE_GTK_UI "Turn on or off compilation of gtk interface." YES)
option(ENABLE_LDAP "Enable LDAP support." NO)
option(ENABLE_LIME "Enable Instant Messaging Encryption." NO)
option(ENABLE_MSG_STORAGE "Turn on compilation of message storage." YES)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI" NO)
option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO)
@ -65,27 +66,11 @@ include(CMakePushCheckState)
set(MSVC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/MSVC")
if(MSVC)
list(APPEND CMAKE_REQUIRED_INCLUDES "${MSVC_INCLUDE_DIR}")
if(ENABLE_GTK_UI)
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/intltool_win32.zip")
message(STATUS "Installing intltool")
file(DOWNLOAD http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip "${CMAKE_CURRENT_BINARY_DIR}/intltool_win32.zip" SHOW_PROGRESS)
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "tar" "x" "${CMAKE_CURRENT_BINARY_DIR}/intltool_win32.zip"
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
)
endif()
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/gtk+-bundle_win32.zip")
message(STATUS "Installing GTK")
file(DOWNLOAD http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip "${CMAKE_CURRENT_BINARY_DIR}/gtk+-bundle_win32.zip" SHOW_PROGRESS)
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "tar" "x" "${CMAKE_CURRENT_BINARY_DIR}/gtk+-bundle_win32.zip"
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
)
endif()
endif()
endif()
# find_package should be invoked here to check for libraries - however do NOT
# call include_directories here (see below)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_bellesip_CONFIG_DIR}/BelleSIPConfig.cmake")
include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake")
@ -110,7 +95,11 @@ if(ENABLE_UNIT_TESTS)
endif()
endif()
if(ENABLE_TUNNEL)
find_package(Tunnel)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_tunnel_CONFIG_DIR}/TunnelConfig.cmake")
else()
find_package(Tunnel)
endif()
if(NOT TUNNEL_FOUND)
message(WARNING "Could not find the tunnel library!")
set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support." FORCE)
@ -130,6 +119,7 @@ if(ENABLE_NOTIFY)
endif()
if(ENABLE_GTK_UI)
if(WIN32)
set(GTK2_DEBUG TRUE)
set(GTK2_ADDITIONAL_SUFFIXES "../lib/glib-2.0/include" "../lib/gtk-2.0/include")
endif()
find_package(GTK2 2.18 REQUIRED gtk)
@ -144,17 +134,21 @@ endif()
if(ENABLE_NLS)
find_package(Gettext REQUIRED)
find_package(Intl REQUIRED)
include_directories(${INTL_INCLUDE_DIRS})
endif()
if(ENABLE_CALL_LOGS_STORAGE)
find_package(Sqlite3 REQUIRED)
endif()
if(ENABLE_LIME)
set(HAVE_LIME 1)
endif()
if(UNIX AND NOT APPLE)
include(CheckIncludeFiles)
check_include_files(libudev.h HAVE_LIBUDEV_H)
endif()
# include_directories must be called only UNDER THIS LINE in order to use our
# projects submodules first (we do NOT want to have system headers in first position)
include_directories(
include/
coreapi/
@ -162,33 +156,38 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/coreapi/
${BELLESIP_INCLUDE_DIRS}
${MEDIASTREAMER2_INCLUDE_DIRS}
${XML2_INCLUDE_DIRS}
)
if(ENABLE_TUNNEL)
include_directories(${TUNNEL_INCLUDE_DIRS})
endif()
include_directories(${XML2_INCLUDE_DIRS})
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
set(HAVE_ZLIB 1)
endif()
if(SQLITE3_FOUND)
include_directories(${SQLITE3_INCLUDE_DIRS})
add_definitions("-DMSG_STORAGE_ENABLED")
add_definitions("-DCALL_LOGS_STORAGE_ENABLED")
if(ENABLE_MSG_STORAGE)
add_definitions("-DMSG_STORAGE_ENABLED")
endif()
if(ENABLE_CALL_LOGS_STORAGE)
add_definitions("-DCALL_LOGS_STORAGE_ENABLED")
endif()
endif()
if(ENABLE_TUNNEL)
include_directories(${TUNNEL_INCLUDE_DIRS})
endif()
if(ENABLE_DEBUG_LOGS)
add_definitions("-DDEBUG")
if(INTL_FOUND)
set(HAVE_INTL 1)
include_directories(${INTL_INCLUDE_DIRS})
endif()
if(MSVC)
include_directories(${MSVC_INCLUDE_DIR})
endif()
if(INTL_FOUND)
set(HAVE_INTL 1)
include_directories(${INTL_INCLUDE_DIRECTORIES})
endif()
add_definitions("-DIN_LINPHONE")
if(ENABLE_DEBUG_LOGS)
add_definitions("-DDEBUG")
endif()
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
@ -234,6 +233,13 @@ if(ENABLE_VIDEO)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "Linphone")
endif()
add_subdirectory(coreapi)
add_subdirectory(share)
if(ENABLE_CONSOLE_UI)
@ -258,9 +264,8 @@ write_basic_package_version_file(
VERSION ${LINPHONE_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT LinphoneTargets
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/LinphoneTargets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/LinphoneConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfig.cmake"
@ -268,9 +273,8 @@ configure_file(cmake/LinphoneConfig.cmake.in
)
set(ConfigPackageLocation lib/cmake/Linphone)
install(EXPORT LinphoneTargets
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE LinphoneTargets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES

View file

@ -32,7 +32,7 @@ In order to enable generation of bundle for older MacOS version, it is recommend
Install `GTK`. It is recommended to use the `quartz` backend for better integration.
sudo port install gtk2 +quartz +no_x11
sudo port install gtk-osx-application +no_python
sudo port install gtk-osx-application-gtk2 +no_python
sudo port install hicolor-icon-theme
#### Using HomeBrew
@ -78,7 +78,7 @@ The next pieces need to be compiled manually.
* Install libvpx (Must be manualy build because the macport recipe does not support 'macosx_deployment_target')
git clone https://chromium.googlesource.com/webm/libvpx -b v1.3.0
git clone https://chromium.googlesource.com/webm/libvpx -b v1.4.0
cd libvpx
./configure --prefix=/opt/local \
--target=x86_64-darwin10-gcc \
@ -143,15 +143,12 @@ The next pieces need to be compiled manually.
### Generate portable bundle
If you want to generate a portable bundle, then install `gtk-mac-bundler`:
If you want to generate a portable bundle, then install `gtk-mac-bundler` linphone fork:
git clone https://github.com/jralls/gtk-mac-bundler.git
cd gtk-mac-bundler
git checkout 6e2ed855aaeae43c29436c342ae83568573b5636
git clone git://git.linphone.org/gtk-mac-bundler.git
cd gtk-mac-bundler
make install
export PATH=$PATH:~/.local/bin
# make this dummy charset.alias file for the bundler to be happy:
sudo touch /opt/local/lib/charset.alias
export PATH=$PATH:~/.local/bin
# set writing right for owner on the libssl and libcrypto libraries in order gtk-mac-bundler
# be able to rewrite their rpath
sudo chmod u+w /opt/local/lib/libssl.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib
@ -180,11 +177,11 @@ The resulting bundle is located in Linphone build directory, together with a zip
* For a better appearance, you can install `gtk-quartz-engine` (a GTK theme) that makes GTK application more similar to other Mac applications (but not perfect).
sudo port install gnome-common
git clone https://github.com/jralls/gtk-quartz-engine.git
cd gtk-quartz-engine
./autogen.sh
./configure --prefix=/opt/local CFLAGS="$CFLAGS -Wno-error" && make
sudo make install
git clone https://github.com/jralls/gtk-quartz-engine.git
cd gtk-quartz-engine
./autogen.sh
./configure --prefix=/opt/local CFLAGS="$CFLAGS -Wno-error" && make
sudo make install
Generate a new bundle to have it included.

View file

@ -41,7 +41,7 @@ if(ZLIB_INCLUDE_DIRS)
endif()
if(ENABLE_STATIC)
if(IOS)
if(IOS OR QNX)
set(_ZLIB_STATIC_NAMES z)
else()
set(_ZLIB_STATIC_NAMES zstatic zlibstatic zlibstaticd)

View file

@ -41,7 +41,7 @@ endif()
get_filename_component(LINPHONE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LINPHONE_INCLUDE_DIRS "${LINPHONE_CMAKE_DIR}/../../../include")
set(LINPHONE_LIBRARIES BelledonneCommunications::linphone)
set(LINPHONE_LIBRARIES linphone)
set(LINPHONE_LDFLAGS @LINK_FLAGS@)
list(APPEND LINPHONE_INCLUDE_DIRS ${MEDIASTREAMER2_INCLUDE_DIRS} ${BELLESIP_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES})

View file

@ -43,4 +43,5 @@
#cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1
#cmakedefine HAVE_LIBUDEV_H 0
#cmakedefine HAVE_LIME
#cmakedefine ENABLE_NLS 1

View file

@ -20,13 +20,13 @@
#
############################################################################
if(MSVC AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
find_library(LIBGCC NAMES gcc)
find_library(LIBMINGWEX NAMES mingwex)
endif()
if(NOT WIN32)
find_package(Iconv)
find_package(Iconv QUIET)
endif()
@ -69,6 +69,7 @@ set(SOURCE_FILES
linphonecore.c
linphone_tunnel_config.c
localplayer.c
lpc2xml.c
lpconfig.c
lpconfig.h
lsd.c
@ -120,13 +121,11 @@ else()
list(APPEND SOURCE_FILES linphone_tunnel_stubs.c)
endif()
set(GENERATED_SOURCE_FILES
${CMAKE_CURRENT_BINARY_DIR}/liblinphone_gitversion.h
)
set_source_files_properties(${GENERATED_SOURCE_FILES} PROPERTIES GENERATED TRUE)
find_package(Git)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/liblinphone_gitversion.h
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake)
add_custom_target(liblinphone-git-version
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/liblinphone_gitversion.h"
)
add_definitions(
-DUSE_BELLESIP
@ -150,10 +149,10 @@ endif()
if(ENABLE_TUNNEL)
list(APPEND LIBS ${TUNNEL_LIBRARIES})
endif()
if(MSVC AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
list(APPEND LIBS ${LIBGCC} ${LIBMINGWEX})
endif()
if(WIN32 AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
list(APPEND LIBS shlwapi)
endif()
if(INTL_FOUND)
@ -161,10 +160,10 @@ if(INTL_FOUND)
endif()
if(ENABLE_STATIC)
add_library(linphone STATIC ${SOURCE_FILES} ${GENERATED_SOURCE_FILES})
add_library(linphone STATIC ${SOURCE_FILES})
target_link_libraries(linphone ${LIBS})
else()
add_library(linphone SHARED ${SOURCE_FILES} ${GENERATED_SOURCE_FILES})
add_library(linphone SHARED ${SOURCE_FILES})
set_target_properties(linphone PROPERTIES VERSION ${LINPHONE_SO_VERSION} LINKER_LANGUAGE CXX)
target_link_libraries(linphone ${LIBS})
if(MSVC)
@ -176,7 +175,8 @@ else()
endif()
endif()
endif()
if(WIN32 AND "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
add_dependencies(linphone liblinphone-git-version)
if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
set_target_properties(linphone PROPERTIES PREFIX "lib")
endif()
if(ICONV_FOUND)
@ -188,7 +188,7 @@ if(ICONV_FOUND)
endif()
endif()
install(TARGETS linphone EXPORT LinphoneTargets
install(TARGETS linphone EXPORT ${EXPORT_TARGETS_NAME}Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib

View file

@ -173,7 +173,7 @@ static bool_t is_matching_regex(const char *entry, const char* regex) {
char err_msg[256];
int res;
res = regcomp(&regex_pattern, regex, REG_EXTENDED | REG_NOSUB);
if(res != REG_NOERROR) {
if(res != 0) {
regerror(res, &regex_pattern, err_msg, sizeof(err_msg));
ms_error("Could not compile regex '%s: %s", regex, err_msg);
return FALSE;

View file

@ -142,8 +142,8 @@ void linphone_auth_info_write_config(LpConfig *config, LinphoneAuthInfo *obj, in
{
char key[50];
bool_t store_ha1_passwd = lp_config_get_int(config, "sip", "store_ha1_passwd", 1);
sprintf(key,"auth_info_%i",pos);
lp_config_clean_section(config,key);
@ -275,18 +275,10 @@ const LinphoneAuthInfo *_linphone_core_find_auth_info(LinphoneCore *lc, const ch
if (ai==NULL){
ai=find_auth_info(lc,username,NULL,NULL, ignore_realm);
}
/*if (ai) ms_message("linphone_core_find_auth_info(): returning auth info username=%s, realm=%s", ai->username, ai->realm);*/
if (ai) ms_message("linphone_core_find_auth_info(): returning auth info username=%s, realm=%s", ai->username ? ai->username : "", ai->realm ? ai->realm : "");
return ai;
}
/**
* Find authentication info matching realm, username, domain criteria.
* First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.
* @param lc the LinphoneCore
* @param realm the authentication 'realm' (optional)
* @param username the SIP username to be authenticated (mandatory)
* @param domain the SIP domain name (optional)
* @return a #LinphoneAuthInfo
**/
const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username, const char *domain){
return _linphone_core_find_auth_info(lc, realm, username, domain, TRUE);
}
@ -295,9 +287,9 @@ const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const cha
void linphone_core_write_auth_info(LinphoneCore *lc, LinphoneAuthInfo *ai){
int i;
MSList *elem = lc->auth_info;
if (!lc->sip_conf.save_auth_info) return;
for (i=0; elem != NULL; elem = elem->next, i++){
if (ai == elem->data){
linphone_auth_info_write_config(lc->config, ai, i);

View file

@ -357,6 +357,7 @@ static void call_process_transaction_terminated(void *user_ctx, const belle_sip_
belle_sip_server_transaction_t *server_transaction=belle_sip_transaction_terminated_event_get_server_transaction(event);
belle_sip_request_t* req;
belle_sip_response_t* resp;
int code = 0;
bool_t release_call=FALSE;
if (client_transaction) {
@ -366,12 +367,19 @@ static void call_process_transaction_terminated(void *user_ctx, const belle_sip_
req=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(server_transaction));
resp=belle_sip_transaction_get_response(BELLE_SIP_TRANSACTION(server_transaction));
}
if (op->state ==SalOpStateTerminating
if (resp) code = belle_sip_response_get_status_code(resp);
if (op->state == SalOpStateTerminating
&& strcmp("BYE",belle_sip_request_get_method(req))==0
&& (!resp || (belle_sip_response_get_status_code(resp) !=401
&& belle_sip_response_get_status_code(resp) !=407))
&& (!resp || (belle_sip_response_get_status_code(resp) != 401
&& belle_sip_response_get_status_code(resp) != 407))
&& op->dialog==NULL) {
release_call=TRUE;
}else if (op->state == SalOpStateEarly && code < 200){
/*call terminated early*/
sal_error_info_set(&op->error_info,SalReasonIOError,503,"I/O error",NULL);
op->base.root->callbacks.call_failure(op);
release_call=TRUE;
}
if (server_transaction){
if (op->pending_server_trans==server_transaction){
@ -546,10 +554,9 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t
drop_op = TRUE;
}
break;
} /* else same behavior as for EARLY state*/
} /* else same behavior as for EARLY state, thus NO BREAK*/
}
case BELLE_SIP_DIALOG_EARLY: {
//hmm probably a cancel
if (strcmp("CANCEL",method)==0) {
if(belle_sip_request_event_get_server_transaction(event)) {
/*first answer 200 ok to cancel*/
@ -864,6 +871,9 @@ int sal_call_accept(SalOp*h){
belle_sip_object_unref(h->pending_update_server_trans);
h->pending_update_server_trans=NULL;
}
if (h->state == SalOpStateEarly){
h->state = SalOpStateActive;
}
return 0;
}

View file

@ -129,8 +129,7 @@ static void subscribe_process_request_event(void *op_base, const belle_sip_reque
if (!op->dialog) {
if (strcmp(method,"SUBSCRIBE")==0){
op->dialog=belle_sip_provider_create_dialog(op->base.root->prov,BELLE_SIP_TRANSACTION(server_transaction));
belle_sip_dialog_set_application_data(op->dialog,op);
sal_op_ref(op);
belle_sip_dialog_set_application_data(op->dialog, sal_op_ref(op));
ms_message("new incoming subscription from [%s] to [%s]",sal_op_get_from(op),sal_op_get_to(op));
}else{ /*this is a NOTIFY*/
handle_notify(op,req,eventname,&body);

View file

@ -72,7 +72,7 @@ void sal_op_authenticate(SalOp *op, const SalAuthInfo *info){
/*Registration authenticate is just about registering again*/
sal_register_refresh(op,-1);
}else {
/*for sure auth info will be accesible from the provider*/
/*for sure auth info will be accessible from the provider*/
sal_process_authentication(op);
}
return ;
@ -814,6 +814,11 @@ void sal_call_set_sdp_handling(SalOp *h, SalOpSDPHandling handling) {
void sal_op_cnx_ip_to_0000_if_sendonly_enable(SalOp *op,bool_t yesno) {
op->cnx_ip_to_0000_if_sendonly_enabled = yesno;
}
bool_t sal_op_cnx_ip_to_0000_if_sendonly_enabled(SalOp *op) {
return op->cnx_ip_to_0000_if_sendonly_enabled;
}
bool_t sal_op_is_forked_of(const SalOp *op1, const SalOp *op2){
return op1->base.call_id && op2->base.call_id && strcmp(op1->base.call_id, op2->base.call_id) == 0;
}

View file

@ -47,42 +47,39 @@ void sal_add_presence_info(SalOp *op, belle_sip_message_t *notify, SalPresenceMo
}
static void presence_process_io_error(void *user_ctx, const belle_sip_io_error_event_t *event){
ms_error("presence_process_io_error not implemented yet");
/*ms_error("presence_process_io_error not implemented yet");*/
}
static void presence_process_dialog_terminated(void *ctx, const belle_sip_dialog_terminated_event_t *event) {
SalOp* op= (SalOp*)ctx;
if (op->dialog) {
sal_op_unref(op);
op->dialog=NULL;
if (belle_sip_dialog_is_server(op->dialog)){
ms_message("Incoming subscribtion from [%s] terminated",sal_op_get_from(op));
op->base.root->callbacks.subscribe_presence_closed(op, sal_op_get_from(op));
}
set_or_update_dialog(op, NULL);
}
}
static void presence_refresher_listener(belle_sip_refresher_t* refresher, void* user_pointer, unsigned int status_code, const char* reason_phrase){
SalOp* op = (SalOp*)user_pointer;
switch(status_code){
case 481: {
ms_message("The server or remote ua lost the SUBSCRIBE dialog context. Let's restart a new one.");
belle_sip_refresher_stop(op->refresher);
if (op->dialog) { /*delete previous dialog if any*/
belle_sip_dialog_set_application_data(op->dialog,NULL);
belle_sip_object_unref(op->dialog);
op->dialog=NULL;
}
if (sal_op_get_contact_address(op)) {
/*contact is also probably not good*/
SalAddress* contact=sal_address_clone(sal_op_get_contact_address(op));
sal_address_set_port(contact,-1);
sal_address_set_domain(contact,NULL);
sal_op_set_contact_address(op,contact);
sal_address_destroy(contact);
}
sal_subscribe_presence(op,NULL,NULL,-1);
break;
if (status_code >= 300) {
ms_message("The SUBSCRIBE dialog no longer works. Let's restart a new one.");
belle_sip_refresher_stop(op->refresher);
if (op->dialog) { /*delete previous dialog if any*/
set_or_update_dialog(op, NULL);
}
if (sal_op_get_contact_address(op)) {
/*contact is also probably not good*/
SalAddress* contact=sal_address_clone(sal_op_get_contact_address(op));
sal_address_set_port(contact,-1);
sal_address_set_domain(contact,NULL);
sal_op_set_contact_address(op,contact);
sal_address_destroy(contact);
}
/*send a new SUBSCRIBE, that will attempt to establish a new dialog*/
sal_subscribe_presence(op,NULL,NULL,-1);
}
}
@ -99,9 +96,11 @@ static void presence_response_event(void *op_base, const belle_sip_response_even
sal_op_set_error_info_from_response(op,response);
if (code>=300) {
ms_message("subscription to [%s] rejected",sal_op_get_to(op));
op->base.root->callbacks.notify_presence(op,SalSubscribeTerminated, NULL,NULL); /*NULL = offline*/
return;
if (strcmp("SUBSCRIBE",belle_sip_request_get_method(request))==0){
ms_message("subscription to [%s] rejected",sal_op_get_to(op));
op->base.root->callbacks.notify_presence(op,SalSubscribeTerminated, NULL,NULL); /*NULL = offline*/
return;
}
}
set_or_update_dialog(op_base,belle_sip_response_event_get_dialog(event));
if (!op->dialog) {
@ -144,11 +143,21 @@ static void presence_response_event(void *op_base, const belle_sip_response_even
}
/* no break */
}
}
static void presence_process_timeout(void *user_ctx, const belle_sip_timeout_event_t *event) {
ms_error("presence_process_timeout not implemented yet");
SalOp* op = (SalOp*)user_ctx;
belle_sip_client_transaction_t* client_transaction = belle_sip_timeout_event_get_client_transaction(event);
belle_sip_request_t* request;
if (!client_transaction) return;
request = belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(client_transaction));
if (strcmp("SUBSCRIBE",belle_sip_request_get_method(request))==0){
ms_message("subscription to [%s] timeout",sal_op_get_to(op));
op->base.root->callbacks.notify_presence(op,SalSubscribeTerminated, NULL,NULL); /*NULL = offline*/
}
}
static void presence_process_transaction_terminated(void *user_ctx, const belle_sip_transaction_terminated_event_t *event) {
@ -177,15 +186,19 @@ static SalPresenceModel * process_presence_notification(SalOp *op, belle_sip_req
return result;
}
static void handle_notify(SalOp *op, belle_sip_request_t *req){
static void handle_notify(SalOp *op, belle_sip_request_t *req, belle_sip_dialog_t *dialog){
belle_sip_response_t* resp=NULL;
belle_sip_server_transaction_t* server_transaction=op->pending_server_trans;
belle_sip_header_subscription_state_t* subscription_state_header=belle_sip_message_get_header_by_type(req,belle_sip_header_subscription_state_t);
SalSubscribeStatus sub_state;
if (strcmp("NOTIFY",belle_sip_request_get_method(req))==0) {
SalPresenceModel *presence_model = NULL;
const char* body = belle_sip_message_get_body(BELLE_SIP_MESSAGE(req));
if (op->dialog !=NULL && dialog != op->dialog){
ms_warning("Receiving a NOTIFY from a dialog we haven't stored (op->dialog=%p dialog=%p)", op->dialog, dialog);
}
if (!subscription_state_header || strcasecmp(BELLE_SIP_SUBSCRIPTION_STATE_TERMINATED,belle_sip_header_subscription_state_get_state(subscription_state_header)) ==0) {
sub_state=SalSubscribeTerminated;
ms_message("Outgoing subscription terminated by remote [%s]",sal_op_get_to(op));
@ -212,7 +225,6 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques
belle_sip_server_transaction_t* server_transaction = belle_sip_provider_create_server_transaction(op->base.root->prov,belle_sip_request_event_get_request(event));
belle_sip_request_t* req = belle_sip_request_event_get_request(event);
belle_sip_dialog_state_t dialog_state;
belle_sip_header_expires_t* expires = belle_sip_message_get_header_by_type(req,belle_sip_header_expires_t);
belle_sip_response_t* resp;
const char *method=belle_sip_request_get_method(req);
@ -223,13 +235,12 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques
if (!op->dialog) {
if (strcmp(method,"SUBSCRIBE")==0){
op->dialog=belle_sip_provider_create_dialog(op->base.root->prov,BELLE_SIP_TRANSACTION(server_transaction));
belle_sip_dialog_set_application_data(op->dialog,op);
sal_op_ref(op);
belle_sip_dialog_t *dialog = belle_sip_provider_create_dialog(op->base.root->prov,BELLE_SIP_TRANSACTION(server_transaction));
set_or_update_dialog(op, dialog);
ms_message("new incoming subscription from [%s] to [%s]",sal_op_get_from(op),sal_op_get_to(op));
}else{ /* this is a NOTIFY */
ms_message("Receiving out of dialog notify");
handle_notify(op,req);
handle_notify(op, req, belle_sip_request_event_get_dialog(event));
return;
}
}
@ -245,16 +256,13 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques
case BELLE_SIP_DIALOG_CONFIRMED:
if (strcmp("NOTIFY",method)==0) {
handle_notify(op,req);
handle_notify(op, req, belle_sip_request_event_get_dialog(event));
} else if (strcmp("SUBSCRIBE",method)==0) {
/*either a refresh or an unsubscribe*/
if (expires && belle_sip_header_expires_get_expires(expires)>0) {
op->base.root->callbacks.subscribe_presence_received(op,sal_op_get_from(op));
} else if(expires) {
ms_message("Unsubscribe received from [%s]",sal_op_get_from(op));
resp=sal_op_create_response_from_request(op,req,200);
belle_sip_server_transaction_send_response(server_transaction,resp);
}
/*either a refresh or an unsubscribe.
If it is a refresh there is nothing to notify to the app. If it is an unSUBSCRIBE, then the dialog
will be terminated shortly, and this will be notified to the app through the dialog_terminated callback.*/
resp=sal_op_create_response_from_request(op,req,200);
belle_sip_server_transaction_send_response(server_transaction,resp);
}
break;
default:
@ -330,8 +338,8 @@ static int sal_op_check_dialog_state(SalOp *op) {
return -1;
} else
return 0;
}
int sal_notify_presence(SalOp *op, SalPresenceModel *presence){
belle_sip_request_t* notify=NULL;
if (sal_op_check_dialog_state(op)) {

View file

@ -331,7 +331,7 @@ static void stream_description_to_sdp ( belle_sdp_session_description_t *session
}
}
if ((rtp_port != 0) && ((stream->proto == SalProtoRtpAvpf) || (stream->proto == SalProtoRtpSavpf))) {
if ((rtp_port != 0) && sal_stream_description_has_avpf(stream)) {
add_rtcp_fb_attributes(media_desc, md, stream);
}

View file

@ -281,6 +281,7 @@ static void _linphone_call_log_destroy(LinphoneCallLog *cl) {
if (cl->call_id) ms_free(cl->call_id);
if (cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]);
if (cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]);
if (cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]);
}
LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *from, LinphoneAddress *to) {
@ -296,6 +297,7 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *fr
cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]=linphone_reporting_new();
cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]=linphone_reporting_new();
cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]=linphone_reporting_new();
cl->connected_date_time=0;
return cl;
}
@ -343,6 +345,26 @@ static void linphone_create_table(sqlite3* db) {
}
}
void linphone_update_call_log_table(sqlite3* db) {
char* errmsg=NULL;
int ret;
// for image url storage
ret=sqlite3_exec(db,"ALTER TABLE call_history ADD COLUMN call_id TEXT;",NULL,NULL,&errmsg);
if(ret != SQLITE_OK) {
ms_message("Table already up to date: %s.", errmsg);
sqlite3_free(errmsg);
} else {
ret=sqlite3_exec(db,"ALTER TABLE call_history ADD COLUMN refkey TEXT;",NULL,NULL,&errmsg);
if(ret != SQLITE_OK) {
ms_message("Table already up to date: %s.", errmsg);
sqlite3_free(errmsg);
} else {
ms_debug("Table call_history updated successfully for call_id and refkey.");
}
}
}
static int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) {
#if defined(ANDROID) || defined(__QNXNTO__)
return sqlite3_open(db_file, db);
@ -387,6 +409,7 @@ void linphone_core_call_log_storage_init(LinphoneCore *lc) {
}
linphone_create_table(db);
linphone_update_call_log_table(db);
lc->logs_db = db;
// Load the existing call logs
@ -411,6 +434,8 @@ void linphone_core_call_log_storage_close(LinphoneCore *lc) {
* | 7 | status
* | 8 | video enabled (1 or 0)
* | 9 | quality
* | 10 | call_id
* | 11 | refkey
*/
static int create_call_log(void *data, int argc, char **argv, char **colName) {
MSList **list = (MSList **)data;
@ -433,6 +458,15 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
log->video_enabled = atoi(argv[8]) == 1;
log->quality = atof(argv[9]);
if (argc > 10) {
if (argv[10] != NULL) {
log->call_id = ms_strdup(argv[10]);
}
if (argv[10] != NULL) {
log->refkey = ms_strdup(argv[11]);
}
}
*list = ms_list_append(*list, log);
return 0;
@ -466,7 +500,7 @@ void linphone_core_store_call_log(LinphoneCore *lc, LinphoneCallLog *log) {
from = linphone_address_as_string(log->from);
to = linphone_address_as_string(log->to);
buf = sqlite3_mprintf("INSERT INTO call_history VALUES(NULL,%Q,%Q,%i,%i,%lld,%lld,%i,%i,%f);",
buf = sqlite3_mprintf("INSERT INTO call_history VALUES(NULL,%Q,%Q,%i,%i,%lld,%lld,%i,%i,%f,%Q,%Q);",
from,
to,
log->dir,
@ -475,13 +509,16 @@ void linphone_core_store_call_log(LinphoneCore *lc, LinphoneCallLog *log) {
(int64_t)log->connected_date_time,
log->status,
log->video_enabled ? 1 : 0,
log->quality
log->quality,
log->call_id,
log->refkey
);
linphone_sql_request_generic(lc->logs_db, buf);
sqlite3_free(buf);
ms_free(from);
ms_free(to);
sqlite3_last_insert_rowid(lc->logs_db);
log->storage_id = sqlite3_last_insert_rowid(lc->logs_db);
}
if (lc) {
@ -489,22 +526,47 @@ void linphone_core_store_call_log(LinphoneCore *lc, LinphoneCallLog *log) {
}
}
static void copy_user_data_from_existing_log(MSList *existing_logs, LinphoneCallLog *log) {
while (existing_logs) {
LinphoneCallLog *existing_log = (LinphoneCallLog *)existing_logs->data;
if (existing_log->storage_id == log->storage_id) {
log->user_data = existing_log->user_data;
break;
}
existing_logs = ms_list_next(existing_logs);
}
}
static void copy_user_data_from_existing_logs(MSList *existing_logs, MSList *new_logs) {
while (new_logs) {
LinphoneCallLog *new_log = (LinphoneCallLog *)new_logs->data;
copy_user_data_from_existing_log(existing_logs, new_log);
new_logs = ms_list_next(new_logs);
}
}
const MSList *linphone_core_get_call_history(LinphoneCore *lc) {
char *buf;
uint64_t begin,end;
MSList *result = NULL;
if (!lc || lc->logs_db == NULL) return NULL;
lc->call_logs = ms_list_free_with_data(lc->call_logs, (void (*)(void*))linphone_call_log_unref);
buf = sqlite3_mprintf("SELECT * FROM call_history ORDER BY id DESC LIMIT %i", lc->max_call_logs);
begin = ortp_get_cur_time_ms();
linphone_sql_request_call_log(lc->logs_db, buf, &lc->call_logs);
linphone_sql_request_call_log(lc->logs_db, buf, &result);
end = ortp_get_cur_time_ms();
ms_message("%s(): completed in %i ms",__FUNCTION__, (int)(end-begin));
sqlite3_free(buf);
if (lc->call_logs) {
copy_user_data_from_existing_logs(lc->call_logs, result);
}
lc->call_logs = ms_list_free_with_data(lc->call_logs, (void (*)(void*))linphone_call_log_unref);
lc->call_logs = result;
return lc->call_logs;
}
@ -568,6 +630,10 @@ MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, const Linp
sqlite3_free(buf);
ms_free(sipAddress);
if (lc->call_logs) {
copy_user_data_from_existing_logs(lc->call_logs, result);
}
return result;
}
@ -592,6 +658,10 @@ LinphoneCallLog * linphone_core_get_last_outgoing_call_log(LinphoneCore *lc) {
result = (LinphoneCallLog*)list->data;
}
if (lc->call_logs && result) {
copy_user_data_from_existing_log(lc->call_logs, result);
}
return result;
}

View file

@ -119,6 +119,14 @@ void linphone_call_params_add_custom_sdp_media_attribute(LinphoneCallParams *par
params->custom_sdp_media_attributes[type] = sal_custom_sdp_attribute_append(params->custom_sdp_media_attributes[type], attribute_name, attribute_value);
}
void linphone_call_params_clear_custom_sdp_attributes(LinphoneCallParams *params) {
linphone_call_params_set_custom_sdp_attributes(params, NULL);
}
void linphone_call_params_clear_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type) {
linphone_call_params_set_custom_sdp_media_attributes(params, type, NULL);
}
LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp){
unsigned int i;
LinphoneCallParams *ncp=linphone_call_params_new();
@ -226,6 +234,11 @@ const LinphonePayloadType* linphone_call_params_get_used_video_codec(const Linph
return cp->video_codec;
}
const LinphonePayloadType* linphone_call_params_get_used_text_codec(const LinphoneCallParams *cp) {
return cp->text_codec;
}
bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams *cp) {
return cp->low_bandwidth;
}

View file

@ -208,6 +208,13 @@ LINPHONE_PUBLIC const LinphonePayloadType* linphone_call_params_get_used_audio_c
**/
LINPHONE_PUBLIC const LinphonePayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp);
/**
* Get the text codec used in the call, described as a LinphonePayloadType structure.
* @param[in] cp LinphoneCallParams object
* @return The LinphonePayloadType object corresponding to the text codec being used in the call.
**/
LINPHONE_PUBLIC const LinphonePayloadType* linphone_call_params_get_used_text_codec(const LinphoneCallParams *cp);
/**
* Tell whether the call has been configured in low bandwidth mode or not.
* This mode can be automatically discovered thanks to a stun server when activate_edge_workarounds=1 in section [net] of configuration file.
@ -426,6 +433,21 @@ LINPHONE_PUBLIC const char * linphone_call_params_get_custom_sdp_attribute(const
**/
LINPHONE_PUBLIC const char * linphone_call_params_get_custom_sdp_media_attribute(const LinphoneCallParams *params, LinphoneStreamType type, const char *attribute_name);
/**
* Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
* @param[in] params The #LinphoneCallParams to clear the custom SDP attributes from.
* @ingroup media_parameters
**/
LINPHONE_PUBLIC void linphone_call_params_clear_custom_sdp_attributes(LinphoneCallParams *params);
/**
* Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
* @param[in] params The #LinphoneCallParams to clear the custom SDP attributes from.
* @param[in] type The type of the stream to clear the custom SDP attributes from.
* @ingroup media_parameters
**/
LINPHONE_PUBLIC void linphone_call_params_clear_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type);
/*******************************************************************************
* DEPRECATED *

View file

@ -537,7 +537,7 @@ static void process_call_accepted(LinphoneCore *lc, LinphoneCall *call, SalOp *o
next_state = LinphoneCallPausedByRemote;
next_state_str = "Call paused by remote";
}else{
if (!call->current_params->in_conference)
if (!call->params->in_conference)
lc->current_call=call;
next_state = LinphoneCallStreamsRunning;
next_state_str = "Streams running";

View file

@ -326,6 +326,8 @@ void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatMessage
return;
}
msg->dir = LinphoneChatMessageOutgoing;
// add to transient list
cr->transient_messages = ms_list_append(cr->transient_messages, linphone_chat_message_ref(msg));
@ -392,7 +394,6 @@ void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatMessage
ms_free(peer_uri);
}
msg->dir = LinphoneChatMessageOutgoing;
if (msg->from){
/*
* BUG

View file

@ -276,21 +276,6 @@ static int convert_conference_to_call(LinphoneCore *lc){
return err;
}
/**
* Remove a call from the conference.
* @param lc the linphone core
* @param call a call that has been previously merged into the conference.
*
* After removing the remote participant belonging to the supplied call, the call becomes a normal call in paused state.
* If one single remote participant is left alone together with the local user in the conference after the removal, then the conference is
* automatically transformed into a simple call in StreamsRunning state.
* The conference's resources are then automatically destroyed.
*
* In other words, unless linphone_core_leave_conference() is explicitely called, the last remote participant of a conference is automatically
* put in a simple call in running state.
*
* @return 0 if successful, -1 otherwise.
**/
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){
int err;
char * str=linphone_call_get_remote_address_as_string(call);

View file

@ -102,7 +102,7 @@ LinphoneFriend *linphone_find_friend_by_out_subscribe(MSList *l, SalOp *op){
LinphoneFriend *lf;
for (elem=l;elem!=NULL;elem=elem->next){
lf=(LinphoneFriend*)elem->data;
if (lf->outsub==op) return lf;
if (lf->outsub && (lf->outsub == op || sal_op_is_forked_of(lf->outsub, op))) return lf;
}
return NULL;
}
@ -240,11 +240,16 @@ void linphone_friend_notify(LinphoneFriend *lf, LinphonePresenceModel *presence)
}
void linphone_friend_add_incoming_subscription(LinphoneFriend *lf, SalOp *op){
/*ownership of the op is transfered from sal to the LinphoneFriend*/
lf->insubs = ms_list_append(lf->insubs, op);
}
void linphone_friend_remove_incoming_subscription(LinphoneFriend *lf, SalOp *op){
lf->insubs = ms_list_remove(lf->insubs, op);
if (ms_list_find(lf->insubs, op)){
sal_op_release(op);
lf->insubs = ms_list_remove(lf->insubs, op);
}
}
static void linphone_friend_unsubscribe(LinphoneFriend *lf){
@ -273,7 +278,7 @@ static void linphone_friend_invalidate_subscription(LinphoneFriend *lf){
void linphone_friend_close_subscriptions(LinphoneFriend *lf){
linphone_friend_unsubscribe(lf);
ms_list_for_each(lf->insubs, (MSIterateFunc) sal_notify_presence_close);
lf->insubs = ms_list_free_with_data(lf->insubs, (MSIterateFunc)sal_op_release);
}
static void _linphone_friend_destroy(LinphoneFriend *lf){
@ -287,6 +292,17 @@ static void _linphone_friend_destroy(LinphoneFriend *lf){
if (lf->info!=NULL) buddy_info_free(lf->info);
}
static belle_sip_error_code _linphone_friend_marshall(belle_sip_object_t *obj, char* buff, size_t buff_size, size_t *offset) {
LinphoneFriend *lf = (LinphoneFriend*)obj;
belle_sip_error_code err = BELLE_SIP_OK;
if (lf->uri){
char *tmp = linphone_address_as_string(lf->uri);
err = belle_sip_snprintf(buff, buff_size, offset, "%s", tmp);
ms_free(tmp);
}
return err;
}
const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf){
return lf->uri;
}
@ -373,7 +389,7 @@ LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf){
break;
case LinphonePresenceActivityOnline:
/* Should not happen! */
ms_warning("LinphonePresenceActivityOnline should not happen here!");
/*ms_warning("LinphonePresenceActivityOnline should not happen here!");*/
break;
case LinphonePresenceActivityOffline:
online_status = LinphoneStatusOffline;
@ -488,6 +504,11 @@ void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
return ;
}
lc->friends=ms_list_append(lc->friends,linphone_friend_ref(lf));
if (ms_list_find(lc->subscribers, lf)){
/*if this friend was in the pending subscriber list, now remove it from this list*/
lc->subscribers = ms_list_remove(lc->subscribers, lf);
linphone_friend_unref(lf);
}
lf->lc=lc;
if ( linphone_core_ready(lc)) linphone_friend_apply(lf,lc);
else lf->commit=TRUE;
@ -497,7 +518,7 @@ void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
MSList *el=ms_list_find(lc->friends,fl);
if (el!=NULL){
linphone_friend_destroy((LinphoneFriend*)el->data);
linphone_friend_unref((LinphoneFriend*)el->data);
lc->friends=ms_list_remove_link(lc->friends,el);
linphone_core_write_friends_config(lc);
}else{
@ -710,6 +731,6 @@ BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneFriend);
BELLE_SIP_INSTANCIATE_VPTR(LinphoneFriend, belle_sip_object_t,
(belle_sip_object_destroy_t) _linphone_friend_destroy,
NULL, // clone
NULL, // marshal
_linphone_friend_marshall,
FALSE
);

View file

@ -27,13 +27,8 @@ if(GIT_EXECUTABLE)
OUTPUT_VARIABLE GIT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E echo "#define LIBLINPHONE_GIT_VERSION \"${GIT_REVISION}\""
OUTPUT_FILE ${OUTPUT_DIR}/liblinphone_gitversion.h
)
else()
execute_process(
COMMAND ${CMAKE_COMMAND} -E echo "#define LIBLINPHONE_GIT_VERSION \"unknown\""
OUTPUT_FILE ${OUTPUT_DIR}/liblinphone_gitversion.h
)
set(GIT_REVISION "unknown")
endif()
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/liblinphone_gitversion.h" @ONLY)

21
coreapi/gitversion.h.in Normal file
View file

@ -0,0 +1,21 @@
/*
linphone
Copyright (C) 2010-2014 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#define LIBLINPHONE_GIT_VERSION "@GIT_REVISION@"

View file

@ -24,7 +24,7 @@ find_package(Doxygen)
if(DOXYGEN_FOUND)
if(DOXYGEN_DOT_FOUND)
set(top_srcdir ${CMAKE_SOURCE_DIR})
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

View file

@ -521,6 +521,13 @@ LINPHONE_PUBLIC const char *linphone_proxy_config_get_custom_header(LinphoneProx
**/
LINPHONE_PUBLIC void linphone_proxy_config_set_custom_header(LinphoneProxyConfig *cfg, const char *header_name, const char *header_value);
/**
* Find authentication info matching proxy config, if any, similarly to linphone_core_find_auth_info.
* @param[in] cfg #LinphoneProxyConfig object.
* @return a #LinphoneAuthInfo matching proxy config criteria if possible, NULL if nothing can be found.
**/
LINPHONE_PUBLIC const struct _LinphoneAuthInfo* linphone_proxy_config_find_auth_info(const LinphoneProxyConfig *cfg);
/**
* @}
*/

View file

@ -115,7 +115,7 @@ static bool_t at_least_one_stream_started(const LinphoneCall *call){
static bool_t linphone_call_all_streams_encrypted(const LinphoneCall *call) {
int number_of_encrypted_stream = 0;
int number_of_active_stream = 0;
if (call->audiostream && media_stream_get_state((MediaStream *)call->audiostream) == MSStreamStarted) {
number_of_active_stream++;
if(media_stream_secured((MediaStream *)call->audiostream))
@ -726,7 +726,7 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
md->streams[call->main_video_stream_index].dir=get_video_dir_from_call_params(params);
md->streams[call->main_video_stream_index].type=SalVideo;
strncpy(md->streams[call->main_video_stream_index].name,"Video",sizeof(md->streams[call->main_video_stream_index].name)-1);
if (params->has_video){
strncpy(md->streams[call->main_video_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call->main_video_stream_index),sizeof(md->streams[call->main_video_stream_index].rtp_addr));
strncpy(md->streams[call->main_video_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call->main_video_stream_index),sizeof(md->streams[call->main_video_stream_index].rtcp_addr));
@ -761,10 +761,10 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
if (params->realtimetext_enabled) {
strncpy(md->streams[call->main_text_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call->main_text_stream_index),sizeof(md->streams[call->main_text_stream_index].rtp_addr));
strncpy(md->streams[call->main_text_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call->main_text_stream_index),sizeof(md->streams[call->main_text_stream_index].rtcp_addr));
md->streams[call->main_text_stream_index].rtp_port=call->media_ports[call->main_text_stream_index].rtp_port;
md->streams[call->main_text_stream_index].rtcp_port=call->media_ports[call->main_text_stream_index].rtcp_port;
codec_hints.bandwidth_limit=0;
codec_hints.max_codecs=-1;
codec_hints.previously_used=old_md ? old_md->streams[call->main_text_stream_index].already_assigned_payloads : NULL;
@ -1055,7 +1055,7 @@ void linphone_call_fill_media_multicast_addr(LinphoneCall *call) {
LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params, LinphoneProxyConfig *cfg){
LinphoneCall *call = belle_sip_object_new(LinphoneCall);
call->dir=LinphoneCallOutgoing;
call->core=lc;
linphone_call_outgoing_select_ip_version(call,to,cfg);
@ -1123,7 +1123,7 @@ void linphone_call_set_compatible_incoming_call_parameters(LinphoneCall *call, S
static void linphone_call_compute_streams_indexes(LinphoneCall *call, const SalMediaDescription *md) {
int i, j;
bool_t audio_found = FALSE, video_found = FALSE, text_found = FALSE;
for (i = 0; i < md->nb_streams; i++) {
if (md->streams[i].type == SalAudio) {
if (!audio_found) {
@ -1133,7 +1133,7 @@ static void linphone_call_compute_streams_indexes(LinphoneCall *call, const SalM
} else {
ms_message("audio stream index found: %i, but main audio stream already set to %i", i, call->main_audio_stream_index);
}
// Check that the default value of a another stream doesn't match the new one
if (i == call->main_video_stream_index) {
for (j = 0; j < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; j++) {
@ -1163,7 +1163,7 @@ static void linphone_call_compute_streams_indexes(LinphoneCall *call, const SalM
} else {
ms_message("video stream index found: %i, but main video stream already set to %i", i, call->main_video_stream_index);
}
// Check that the default value of a another stream doesn't match the new one
if (i == call->main_audio_stream_index) {
for (j = 0; j < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; j++) {
@ -1193,7 +1193,7 @@ static void linphone_call_compute_streams_indexes(LinphoneCall *call, const SalM
} else {
ms_message("text stream index found: %i, but main text stream already set to %i", i, call->main_text_stream_index);
}
// Check that the default value of a another stream doesn't match the new one
if (i == call->main_audio_stream_index) {
for (j = 0; j < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; j++) {
@ -1233,7 +1233,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
linphone_call_incoming_select_ip_version(call);
sal_op_cnx_ip_to_0000_if_sendonly_enable(op,lp_config_get_default_int(lc->config,"sip","cnx_ip_to_0000_if_sendonly_enabled",0));
md = sal_call_get_remote_media_description(op);
if (lc->sip_conf.ping_with_options){
@ -1282,7 +1282,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
if (md->streams[i].dir == SalStreamInactive) {
continue;
}
if (md->streams[i].rtp_addr[0]!='\0' && ms_is_multicast(md->streams[i].rtp_addr)){
md->streams[i].multicast_role = SalMulticastReceiver;
strncpy(call->media_ports[i].multicast_ip,md->streams[i].rtp_addr,sizeof(call->media_ports[i].multicast_ip));
@ -1422,7 +1422,7 @@ static void linphone_call_set_terminated(LinphoneCall *call){
*/
void linphone_call_fix_call_parameters(LinphoneCall *call, SalMediaDescription *rmd){
const LinphoneCallParams* rcp;
if (rmd) {
linphone_call_compute_streams_indexes(call, rmd);
linphone_call_update_biggest_desc(call, rmd);
@ -1437,10 +1437,12 @@ void linphone_call_fix_call_parameters(LinphoneCall *call, SalMediaDescription *
ms_message("Call [%p]: disabling video in our call params because the remote doesn't want it.", call);
call->params->has_video = FALSE;
}
/*
if (rcp->has_video && call->core->video_policy.automatically_accept && linphone_core_video_enabled(call->core) && !call->params->has_video){
ms_message("Call [%p]: re-enabling video in our call params because the remote wants it and the policy allows to automatically accept.", call);
call->params->has_video = TRUE;
}
*/
if (rcp->realtimetext_enabled && !call->params->realtimetext_enabled) {
call->params->realtimetext_enabled = TRUE;
}
@ -1719,8 +1721,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
if ((all_streams_encrypted = linphone_call_all_streams_encrypted(call)) && linphone_call_get_authentication_token(call)) {
call->current_params->media_encryption=LinphoneMediaEncryptionZRTP;
} else {
ms_message("Encryption was resquested to be %s, but isn't effective (all_streams_encrypted=%i, auth_token=%s)",
linphone_media_encryption_to_string(call->params->media_encryption), all_streams_encrypted, call->auth_token);
ms_message("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i, auth_token=%s)",
linphone_media_encryption_to_string(call->params->media_encryption), all_streams_encrypted, call->auth_token == NULL ? "" : call->auth_token);
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
}
}//else don't update the state if all streams are shutdown.
@ -1731,7 +1733,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
if (linphone_call_get_n_active_streams(call)==0 || (all_streams_encrypted = linphone_call_all_streams_encrypted(call))) {
call->current_params->media_encryption = call->params->media_encryption;
} else {
ms_message("Encryption was resquested to be %s, but isn't effective (all_streams_encrypted=%i)",
ms_message("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i)",
linphone_media_encryption_to_string(call->params->media_encryption), all_streams_encrypted);
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
}
@ -1766,7 +1768,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
call->current_params->video_multicast_enabled = ms_is_multicast(rtp_addr);
} else
call->current_params->video_multicast_enabled = FALSE;
sd=sal_media_description_find_best_stream(md,SalText);
}
@ -1783,7 +1785,8 @@ const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call){
if (call->op){
LinphoneCallParams *cp;
SalMediaDescription *md;
const SalCustomHeader *ch;
md=sal_call_get_remote_media_description(call->op);
if (md) {
SalStreamDescription *sd;
@ -1793,7 +1796,7 @@ const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call){
unsigned int nb_text_streams = sal_media_description_nb_active_streams_of_type(md, SalText);
if (call->remote_params != NULL) linphone_call_params_unref(call->remote_params);
cp = call->remote_params = linphone_call_params_new();
for (i = 0; i < nb_video_streams; i++) {
sd = sal_media_description_get_active_stream_of_type(md, SalVideo, i);
if (sal_stream_description_active(sd) == TRUE) cp->has_video = TRUE;
@ -1820,7 +1823,12 @@ const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call){
linphone_call_params_set_custom_sdp_media_attributes(call->remote_params, LinphoneStreamTypeVideo, md->streams[call->main_video_stream_index].custom_sdp_attributes);
linphone_call_params_set_custom_sdp_media_attributes(call->remote_params, LinphoneStreamTypeText, md->streams[call->main_text_stream_index].custom_sdp_attributes);
}
linphone_call_params_set_custom_headers(call->remote_params, sal_op_get_recv_custom_header(call->op));
ch = sal_op_get_recv_custom_header(call->op);
if (ch){
/*instanciate a remote_params only if a SIP message was received before (custom headers indicates this).*/
if (call->remote_params == NULL) call->remote_params = linphone_call_params_new();
linphone_call_params_set_custom_headers(call->remote_params, ch);
}
return call->remote_params;
}
return NULL;
@ -2440,7 +2448,7 @@ void linphone_call_init_text_stream(LinphoneCall *call){
TextStream *textstream;
LinphoneCore *lc=call->core;
char* cname;
if (call->textstream != NULL || !call->params->realtimetext_enabled) return;
if (call->sessions[call->main_text_stream_index].rtp_session == NULL) {
SalMulticastRole multicast_role = linphone_call_get_multicast_role(call, SalText);
@ -2668,7 +2676,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
else if (desc->type==SalVideo)
bw=get_video_bw(call,md,desc);
//else if (desc->type== SalText)
for(elem=desc->payloads;elem!=NULL;elem=elem->next){
PayloadType *pt=(PayloadType*)elem->data;
@ -3179,7 +3187,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, LinphoneCallSta
video_stream_set_direction (call->videostream, dir);
ms_message("%s lc rotation:%d\n", __FUNCTION__, lc->device_rotation);
video_stream_set_device_rotation(call->videostream, lc->device_rotation);
video_stream_set_freeze_on_error(call->videostream, lp_config_get_int(lc->config, "video", "freeze_on_error", 0));
video_stream_set_freeze_on_error(call->videostream, lp_config_get_int(lc->config, "video", "freeze_on_error", 1));
if (is_multicast)
rtp_session_set_multicast_ttl(call->videostream->ms.sessions.rtp_session,vstream->ttl);
@ -3233,7 +3241,7 @@ static void linphone_call_start_text_stream(LinphoneCall *call) {
LinphoneCore *lc = call->core;
int used_pt = -1;
const SalStreamDescription *tstream;
tstream = sal_media_description_find_best_stream(call->resultdesc, SalText);
if (tstream != NULL && tstream->dir != SalStreamInactive && tstream->rtp_port != 0) {
const char *rtp_addr = tstream->rtp_addr[0] != '\0' ? tstream->rtp_addr : call->resultdesc->addr;
@ -3255,9 +3263,9 @@ static void linphone_call_start_text_stream(LinphoneCall *call) {
}
configure_rtp_session_for_rtcp_fb(call, tstream);
configure_rtp_session_for_rtcp_xr(lc, call, SalText);
if (is_multicast) rtp_session_set_multicast_ttl(call->textstream->ms.sessions.rtp_session,tstream->ttl);
text_stream_start(call->textstream, call->text_profile, rtp_addr, tstream->rtp_port, rtcp_addr, (linphone_core_rtcp_enabled(lc) && !is_multicast) ? (tstream->rtcp_port ? tstream->rtcp_port : tstream->rtp_port + 1) : 0, used_pt);
ms_media_stream_sessions_set_encryption_mandatory(&call->textstream->ms.sessions,linphone_core_is_media_encryption_mandatory(call->core));
@ -3394,7 +3402,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
}
#endif
}
if (call->params->realtimetext_enabled) {
linphone_call_start_text_stream(call);
}
@ -3445,7 +3453,7 @@ void linphone_call_update_crypto_parameters(LinphoneCall *call, SalMediaDescript
if (call->audiostream && local_st_desc && old_stream && new_stream &&
update_stream_crypto_params(call,local_st_desc,old_stream,new_stream,&call->audiostream->ms)){
}
local_st_desc = sal_media_description_find_secure_stream_of_type(call->localdesc, SalText);
old_stream = sal_media_description_find_secure_stream_of_type(old_md, SalText);
new_stream = sal_media_description_find_secure_stream_of_type(new_md, SalText);
@ -3543,7 +3551,7 @@ static void linphone_call_stop_audio_stream(LinphoneCall *call) {
ortp_ev_queue_flush(call->audiostream_app_evq);
ortp_ev_queue_destroy(call->audiostream_app_evq);
call->audiostream_app_evq=NULL;
call->current_params->audio_codec = NULL;
}
}
@ -4088,6 +4096,7 @@ static void linphone_call_lost(LinphoneCall *call, LinphoneReason reason){
linphone_core_notify_display_warning(lc, temp);
linphone_core_terminate_call(lc,call);
linphone_core_play_named_tone(lc,LinphoneToneCallLost);
ms_free(temp);
}
static void change_ice_media_destinations(LinphoneCall *call) {
@ -4253,15 +4262,16 @@ void linphone_call_stats_uninit(LinphoneCallStats *stats){
}
void linphone_call_notify_stats_updated(LinphoneCall *call, int stream_index){
LinphoneCallStats *stats=&call->stats[stream_index];
LinphoneCore *lc=call->core;
LinphoneCallStats *stats = &call->stats[stream_index];
LinphoneCore *lc = call->core;
if (stats->updated){
switch(stats->updated) {
case LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE:
case LINPHONE_CALL_STATS_SENT_RTCP_UPDATE:
linphone_reporting_on_rtcp_update(call, stream_index);
linphone_reporting_on_rtcp_update(call, stream_index == call->main_audio_stream_index ? SalAudio : stream_index == call->main_video_stream_index ? SalVideo : SalText);
break;
default:
break;
default:break;
}
linphone_core_notify_call_stats_updated(lc, call, stats);
stats->updated = 0;
@ -4366,7 +4376,8 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
linphone_call_handle_stream_events(call, call->main_audio_stream_index);
linphone_call_handle_stream_events(call, call->main_video_stream_index);
linphone_call_handle_stream_events(call, call->main_text_stream_index);
if (call->state==LinphoneCallStreamsRunning && one_second_elapsed && call->audiostream!=NULL
if ((call->state == LinphoneCallStreamsRunning ||
call->state == LinphoneCallPausedByRemote) && one_second_elapsed && call->audiostream!=NULL
&& call->audiostream->ms.state==MSStreamStarted && disconnect_timeout>0 )
disconnected=!audio_stream_alive(call->audiostream,disconnect_timeout);
if (disconnected)
@ -4375,6 +4386,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
void linphone_call_log_completed(LinphoneCall *call){
LinphoneCore *lc=call->core;
bool_t call_logs_sqlite_db_found = FALSE;
call->log->duration=linphone_call_get_duration(call); /*store duration since connected*/
@ -4387,22 +4399,27 @@ void linphone_call_log_completed(LinphoneCall *call){
linphone_core_notify_display_status(lc,info);
ms_free(info);
}
#ifdef CALL_LOGS_STORAGE_ENABLED
linphone_core_store_call_log(lc, call->log);
#else
lc->call_logs=ms_list_prepend(lc->call_logs,linphone_call_log_ref(call->log));
if (ms_list_size(lc->call_logs)>lc->max_call_logs){
MSList *elem,*prevelem=NULL;
/*find the last element*/
for(elem=lc->call_logs;elem!=NULL;elem=elem->next){
prevelem=elem;
}
elem=prevelem;
linphone_call_log_unref((LinphoneCallLog*)elem->data);
lc->call_logs=ms_list_remove_link(lc->call_logs,elem);
if (lc->logs_db) {
call_logs_sqlite_db_found = TRUE;
linphone_core_store_call_log(lc, call->log);
}
call_logs_write_to_config_file(lc);
#endif
if (!call_logs_sqlite_db_found) {
lc->call_logs=ms_list_prepend(lc->call_logs,linphone_call_log_ref(call->log));
if (ms_list_size(lc->call_logs)>lc->max_call_logs){
MSList *elem,*prevelem=NULL;
/*find the last element*/
for(elem=lc->call_logs;elem!=NULL;elem=elem->next){
prevelem=elem;
}
elem=prevelem;
linphone_call_log_unref((LinphoneCallLog*)elem->data);
lc->call_logs=ms_list_remove_link(lc->call_logs,elem);
}
call_logs_write_to_config_file(lc);
}
linphone_core_notify_call_log_updated(lc,call->log);
}
@ -4706,11 +4723,14 @@ void linphone_call_set_broken(LinphoneCall *call){
case LinphoneCallOutgoingEarlyMedia:
case LinphoneCallIncomingReceived:
case LinphoneCallIncomingEarlyMedia:
linphone_call_lost(call, LinphoneReasonIOError);
/*during the early states, the SAL layer reports the failure from the dialog or transaction layer,
* hence, there is nothing special to do*/
break;
case LinphoneCallStreamsRunning:
case LinphoneCallPaused:
case LinphoneCallPausedByRemote:
/*during these states, the dialog is established. A failure of a transaction is not expected to close it.
* Instead we have to repair the dialog by sending a reINVITE*/
call->broken = TRUE;
break;
default:
@ -4746,3 +4766,14 @@ void linphone_call_repair_if_broken(LinphoneCall *call){
break;
}
}
void linphone_call_refresh_sockets(LinphoneCall *call){
int i;
for (i=0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; ++i){
MSMediaStreamSessions *mss = &call->sessions[i];
if (mss->rtp_session){
rtp_session_refresh_sockets(mss->rtp_session);
}
}
}

View file

@ -584,17 +584,18 @@ static void process_response_from_post_file_log_collection(void *data, const bel
static int compress_file(FILE *input_file, COMPRESS_FILE_PTR output_file) {
char buffer[131072]; /* 128kB */
size_t bytes;
size_t total_bytes = 0;
while ((bytes = fread(buffer, 1, sizeof(buffer), input_file)) > 0) {
#ifdef HAVE_ZLIB
int res = gzwrite(output_file, buffer, (unsigned int)bytes);
if (res < 0) return 0;
total_bytes += (size_t)res;
#else
bytes = fwrite(buffer, 1, bytes, output_file);
if (bytes < 0) return (int)bytes;
total_bytes += fwrite(buffer, 1, bytes, output_file);
#endif
}
return 0;
return total_bytes;
}
static int prepare_log_collection_file_to_upload(const char *filename) {
@ -615,7 +616,7 @@ static int prepare_log_collection_file_to_upload(const char *filename) {
input_file = fopen(input_filename, "r");
if (input_file == NULL) goto error;
ret = compress_file(input_file, output_file);
if (ret == 0) goto error;
if (ret <= 0) goto error;
fclose(input_file);
ms_free(input_filename);
input_filename = ms_strdup_printf("%s/%s2.log",
@ -624,7 +625,7 @@ static int prepare_log_collection_file_to_upload(const char *filename) {
input_file = fopen(input_filename, "r");
if (input_file != NULL) {
ret = compress_file(input_file, output_file);
if (ret == 0) goto error;
if (ret <= 0) goto error;
}
error:
@ -669,7 +670,11 @@ void linphone_core_upload_log_collection(LinphoneCore *core) {
liblinphone_log_collection_prefix ? liblinphone_log_collection_prefix : LOG_COLLECTION_DEFAULT_PREFIX,
COMPRESSED_LOG_COLLECTION_EXTENSION);
linphone_content_set_name(core->log_collection_upload_information, name);
if (prepare_log_collection_file_to_upload(name) < 0) return;
if (prepare_log_collection_file_to_upload(name) <= 0) {
ms_free(core->log_collection_upload_information);
core->log_collection_upload_information = NULL;
return;
}
linphone_content_set_size(core->log_collection_upload_information, get_size_of_file_to_upload(name));
uri = belle_generic_uri_parse(linphone_core_get_log_collection_upload_server_url(core));
req = belle_http_request_create("POST", uri, NULL, NULL, NULL);
@ -688,7 +693,7 @@ char * linphone_core_compress_log_collection() {
filename = ms_strdup_printf("%s_log.%s",
liblinphone_log_collection_prefix ? liblinphone_log_collection_prefix : LOG_COLLECTION_DEFAULT_PREFIX,
COMPRESSED_LOG_COLLECTION_EXTENSION);
if (prepare_log_collection_file_to_upload(filename) < 0) {
if (prepare_log_collection_file_to_upload(filename) <= 0) {
ms_free(filename);
return NULL;
}
@ -1679,7 +1684,7 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab
linphone_core_register_default_codecs(lc);
/* Get the mediastreamer2 event queue */
/* This allows to run event's callback in linphone_core_iterate() */
lc->msevq=ms_factory_get_event_queue(ms_factory_get_fallback());
lc->msevq=ms_factory_create_event_queue(ms_factory_get_fallback());
lc->sal=sal_init();
sal_set_http_proxy_host(lc->sal, linphone_core_get_http_proxy_host(lc));
@ -3561,11 +3566,15 @@ int linphone_core_start_accept_call_update(LinphoneCore *lc, LinphoneCall *call,
* @return 0 if successful, -1 otherwise (actually when this function call is performed outside ot #LinphoneCallUpdatedByRemote state).
**/
int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
if (call->state!=LinphoneCallUpdatedByRemote){
if (call->state != LinphoneCallUpdatedByRemote){
ms_error("linphone_core_accept_update(): invalid state %s to call this function.",
linphone_call_state_to_string(call->state));
return -1;
}
if (call->expect_media_in_ack){
ms_error("linphone_core_accept_call_update() is not possible during a late offer incoming reINVITE (INVITE without SDP)");
return -1;
}
return _linphone_core_accept_call_update(lc, call, params, call->prevstate, linphone_call_state_to_string(call->prevstate));
}
@ -6319,9 +6328,10 @@ void ui_config_uninit(LinphoneCore* lc)
{
ms_message("Destroying friends.");
if (lc->friends){
ms_list_for_each(lc->friends,(void (*)(void *))linphone_friend_unref);
ms_list_free(lc->friends);
lc->friends=NULL;
lc->friends = ms_list_free_with_data(lc->friends, (void (*)(void *))linphone_friend_unref);
}
if (lc->subscribers){
lc->subscribers = ms_list_free_with_data(lc->subscribers, (void (*)(void *))linphone_friend_unref);
}
if (lc->presence_model) {
linphone_presence_model_unref(lc->presence_model);
@ -6417,9 +6427,6 @@ static void linphone_core_uninit(LinphoneCore *lc)
if (lc->chat_db_file){
ms_free(lc->chat_db_file);
}
if(lc->presence_model){
linphone_presence_model_unref(lc->presence_model);
}
linphone_core_free_payload_types(lc);
if (lc->supported_formats) ms_free(lc->supported_formats);
linphone_core_message_storage_close(lc);
@ -6458,6 +6465,9 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
ms_list_for_each(lc->calls, (MSIterateFunc) linphone_call_set_broken);
}else{
linphone_core_resolve_stun_server(lc);
if (lp_config_get_int(lc->config, "net", "recreate_sockets_when_network_is_up", 0)){
ms_list_for_each(lc->calls, (MSIterateFunc)linphone_call_refresh_sockets);
}
}
#ifdef BUILD_UPNP
if(lc->upnp == NULL) {

View file

@ -47,6 +47,9 @@ extern "C" {
struct _LinphoneCore;
struct _LinphoneChatRoom;
struct _LinphoneAuthInfo;
struct _SipSetupContext;
struct _LinphoneInfoMessage;
/**
* Linphone core main object created by function linphone_core_new() .
@ -442,10 +445,6 @@ LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u);
*/
LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address);
struct _SipSetupContext;
struct _LinphoneInfoMessage;
/**
* The LinphoneInfoMessage is an object representing an informational message sent or received by the core.
**/
@ -1022,8 +1021,6 @@ LINPHONE_PUBLIC const char *linphone_registration_state_to_string(LinphoneRegist
#include "linphone_proxy_config.h"
struct _LinphoneAuthInfo;
/**
* @addtogroup authentication
* @{
@ -2900,6 +2897,15 @@ LINPHONE_PUBLIC void linphone_core_remove_auth_info(LinphoneCore *lc, const Linp
LINPHONE_PUBLIC const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc);
/**
* Find authentication info matching realm, username, domain criteria.
* First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.
* @param lc the LinphoneCore
* @param realm the authentication 'realm' (optional)
* @param username the SIP username to be authenticated (mandatory)
* @param domain the SIP domain name (optional)
* @return a #LinphoneAuthInfo
**/
LINPHONE_PUBLIC const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username, const char *sip_domain);
LINPHONE_PUBLIC void linphone_core_abort_authentication(LinphoneCore *lc, LinphoneAuthInfo *info);
@ -3782,7 +3788,22 @@ LINPHONE_PUBLIC LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCor
LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc);
LINPHONE_PUBLIC int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
/**
* Remove a call from the conference.
* @param lc the linphone core
* @param call a call that has been previously merged into the conference.
*
* After removing the remote participant belonging to the supplied call, the call becomes a normal call in paused state.
* If one single remote participant is left alone together with the local user in the conference after the removal, then the conference is
* automatically transformed into a simple call in StreamsRunning state.
* The conference's resources are then automatically destroyed.
*
* In other words, unless linphone_core_leave_conference() is explicitly called, the last remote participant of a conference is automatically
* put in a simple call in running state.
*
* @return 0 if successful, -1 otherwise.
**/
LINPHONE_PUBLIC int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
/**
* Indicates whether the local participant is part of a conference.
* @param lc the linphone core

View file

@ -3718,6 +3718,14 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getCusto
return value ? env->NewStringUTF(value) : NULL;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpAttributes(JNIEnv *env, jobject thiz, jlong ptr) {
linphone_call_params_clear_custom_sdp_attributes((LinphoneCallParams *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpMediaAttributes(JNIEnv *env, jobject thiz, jlong ptr, jint jtype) {
linphone_call_params_clear_custom_sdp_media_attributes((LinphoneCallParams *)ptr, (LinphoneStreamType)jtype);
}
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setRecordFile(JNIEnv *env, jobject thiz, jlong lcp, jstring jrecord_file){
if (jrecord_file){
const char* record_file=env->GetStringUTFChars(jrecord_file, NULL);

View file

@ -56,7 +56,7 @@
#define lp_new0(type,n) (type*)calloc(sizeof(type),n)
#include "lpconfig.h"
#include "lpc2xml.h"
typedef struct _LpItem{
char *key;
@ -877,3 +877,32 @@ err:
if(realfilepath) ms_free(realfilepath);
return -1;
}
const char** lp_config_get_sections_names(LpConfig *lpconfig) {
const char **sections_names;
const MSList *sections = lpconfig->sections;
int ndev;
int i;
ndev = ms_list_size(sections);
sections_names = ms_malloc((ndev + 1) * sizeof(const char *));
for (i = 0; sections != NULL; sections = sections->next, i++) {
LpSection *section = (LpSection *)sections->data;
sections_names[i] = ms_strdup(section->name);
}
sections_names[ndev] = NULL;
return sections_names;
}
char* lp_config_dump_as_xml(const LpConfig *lpconfig) {
char *buffer;
lpc2xml_context *ctx = lpc2xml_context_new(NULL, NULL);
lpc2xml_set_lpc(ctx, lpconfig);
lpc2xml_convert_string(ctx, &buffer);
lpc2xml_context_destroy(ctx);
return buffer;
}

View file

@ -200,6 +200,13 @@ LINPHONE_PUBLIC int lp_config_has_section(const LpConfig *lpconfig, const char *
**/
LINPHONE_PUBLIC void lp_config_clean_section(LpConfig *lpconfig, const char *section);
/**
* Returns the list of sections' names in the LpConfig.
* @param[in] lpconfig The LpConfig object
* @return a null terminated static array of strings
**/
LINPHONE_PUBLIC const char** lp_config_get_sections_names(LpConfig *lpconfig);
/**
* Call a function for each section present in the configuration.
*
@ -295,6 +302,15 @@ LINPHONE_PUBLIC int lp_config_read_relative_file(const LpConfig *lpconfig, const
**/
LINPHONE_PUBLIC bool_t lp_config_relative_file_exists(const LpConfig *lpconfig, const char *filename);
/**
* Dumps the LpConfig as XML into a buffer
* @param[in] lpconfig The LpConfig object
* @return The buffer that contains the XML dump
*
* @ingroup misc
**/
LINPHONE_PUBLIC char* lp_config_dump_as_xml(const LpConfig *lpconfig);
#ifdef __cplusplus
}
#endif

View file

@ -566,6 +566,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
strncpy(result->streams[i].proto_other,rs->proto_other,sizeof(rs->proto_other)-1);
}
}
result->streams[i].custom_sdp_attributes = sal_custom_sdp_attribute_clone(ls->custom_sdp_attributes);
}
result->nb_streams=i;
strcpy(result->username, local_capabilities->username);
@ -577,6 +578,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
strcpy(result->ice_ufrag, local_capabilities->ice_ufrag);
result->ice_lite = local_capabilities->ice_lite;
result->ice_completed = local_capabilities->ice_completed;
result->custom_sdp_attributes = sal_custom_sdp_attribute_clone(local_capabilities->custom_sdp_attributes);
strcpy(result->name,local_capabilities->name);

View file

@ -1444,16 +1444,19 @@ static LinphonePresenceModel * process_pidf_xml_presence_notification(xmlparsing
void linphone_core_add_subscriber(LinphoneCore *lc, const char *subscriber, SalOp *op){
LinphoneFriend *fl=linphone_friend_new_with_address(subscriber);
char *tmp;
if (fl==NULL) return ;
linphone_friend_add_incoming_subscription(fl, op);
linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
fl->inc_subscribe_pending=TRUE;
lc->subscribers=ms_list_append(lc->subscribers,(void *)fl);
{
char *tmp=linphone_address_as_string(fl->uri);
linphone_core_notify_new_subscription_requested(lc,fl,tmp);
ms_free(tmp);
}
/* the newly created "not yet" friend ownership is transfered to the lc->subscribers list*/
lc->subscribers=ms_list_append(lc->subscribers,fl);
tmp = linphone_address_as_string(fl->uri);
linphone_core_notify_new_subscription_requested(lc,fl,tmp);
ms_free(tmp);
}
void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf){
@ -1497,7 +1500,7 @@ void linphone_subscription_new(LinphoneCore *lc, SalOp *op, const char *from){
}
else {
/* else it is in wait for approval state, because otherwise it is in the friend list.*/
ms_message("New subscriber found in friend list, in %s state.",__policy_enum_to_str(lf->pol));
ms_message("New subscriber found in subscriber list, in %s state.",__policy_enum_to_str(lf->pol));
}
}else {
sal_subscribe_accept(op);
@ -1873,9 +1876,16 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, Sa
lf->subscribe_active=TRUE;
linphone_core_notify_notify_presence_received(lc,(LinphoneFriend*)lf);
ms_free(tmp);
if (op != lf->outsub){
/*case of a NOTIFY received out of any dialog*/
sal_op_release(op);
return;
}
}else{
ms_message("But this person is not part of our friend list, so we don't care.");
linphone_presence_model_unref(presence);
sal_op_release(op);
return ;
}
if (ss==SalSubscribeTerminated){
sal_op_release(op);
@ -1889,11 +1899,13 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, Sa
void linphone_subscription_closed(LinphoneCore *lc, SalOp *op){
LinphoneFriend *lf;
lf=linphone_find_friend_by_inc_subscribe(lc->friends,op);
sal_op_release(op);
if (lf!=NULL){
/*this will release the op*/
linphone_friend_remove_incoming_subscription(lf, op);
}else{
ms_warning("Receiving unsuscribe for unknown in-subscribtion from %s", sal_op_get_from(op));
/*case of an op that we already released because the friend was destroyed*/
ms_message("Receiving unsuscribe for unknown in-subscribtion from %s", sal_op_get_from(op));
}
}

View file

@ -153,7 +153,7 @@ BELLE_SIP_DECLARE_VPTR(LinphoneCallParams);
struct _LinphoneQualityReporting{
reporting_session_report_t * reports[2]; /**Store information on audio and video media streams (RFC 6035) */
reporting_session_report_t * reports[3]; /**Store information on audio and video media streams (RFC 6035) */
bool_t was_video_running; /*Keep video state since last check in order to detect its (de)activation*/
LinphoneQualityReportingReportSendCb on_report_sent;
};
@ -343,6 +343,7 @@ void linphone_call_log_completed(LinphoneCall *call);
void linphone_call_log_destroy(LinphoneCallLog *cl);
void linphone_call_set_transfer_state(LinphoneCall* call, LinphoneCallState state);
LinphonePlayer *linphone_call_build_player(LinphoneCall*call);
void linphone_call_refresh_sockets(LinphoneCall *call);
LinphoneCallParams * linphone_call_params_new(void);
SalMediaProto get_proto_from_call_params(const LinphoneCallParams *params);
@ -938,7 +939,6 @@ void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t ena
bool_t linphone_core_can_we_add_call(LinphoneCore *lc);
int linphone_core_add_call( LinphoneCore *lc, LinphoneCall *call);
int linphone_core_del_call( LinphoneCore *lc, LinphoneCall *call);
int linphone_core_set_as_current_call(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_get_calls_nb(const LinphoneCore *lc);
void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message);

View file

@ -1548,3 +1548,9 @@ uint8_t linphone_proxy_config_get_avpf_rr_interval(const LinphoneProxyConfig *cf
const LinphoneAddress* linphone_proxy_config_get_contact(const LinphoneProxyConfig *cfg) {
return sal_op_get_contact_address(cfg->op);
}
const struct _LinphoneAuthInfo* linphone_proxy_config_find_auth_info(const LinphoneProxyConfig *cfg) {
const char* username = cfg->identity_address ? linphone_address_get_username(cfg->identity_address) : NULL;
const char* domain = cfg->identity_address ? linphone_address_get_domain(cfg->identity_address) : NULL;
return _linphone_core_find_auth_info(cfg->lc, cfg->realm, username, domain, TRUE);
}

View file

@ -160,6 +160,9 @@ static bool_t media_report_enabled(LinphoneCall * call, int stats_type){
if (stats_type == LINPHONE_CALL_STATS_VIDEO && !linphone_call_params_video_enabled(linphone_call_get_current_params(call)))
return FALSE;
if (stats_type == LINPHONE_CALL_STATS_TEXT && !linphone_call_params_realtime_text_enabled(linphone_call_get_current_params(call)))
return FALSE;
return (call->log->reporting.reports[stats_type] != NULL);
}
@ -344,11 +347,9 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
linphone_content_set_buffer(content, buffer, strlen(buffer));
ms_free(buffer);
if (call->log->reporting.on_report_sent != NULL){
call->log->reporting.on_report_sent(
call,
(report==call->log->reporting.reports[0])?LINPHONE_CALL_STATS_AUDIO:LINPHONE_CALL_STATS_VIDEO,
content);
if (call->log->reporting.on_report_sent != NULL) {
SalStreamType type = report == call->log->reporting.reports[0] ? LINPHONE_CALL_STATS_AUDIO : report == call->log->reporting.reports[1] ? LINPHONE_CALL_STATS_VIDEO : LINPHONE_CALL_STATS_TEXT;
call->log->reporting.on_report_sent(call, type, content);
}
@ -401,7 +402,7 @@ static const SalStreamDescription * get_media_stream_for_desc(const SalMediaDesc
}
static void update_ip(LinphoneCall * call, int stats_type) {
SalStreamType sal_stream_type = (stats_type == LINPHONE_CALL_STATS_AUDIO) ? SalAudio : SalVideo;
SalStreamType sal_stream_type = stats_type == LINPHONE_CALL_STATS_AUDIO ? SalAudio : stats_type == LINPHONE_CALL_STATS_VIDEO ? SalVideo : SalText;
const SalStreamDescription * local_desc = get_media_stream_for_desc(call->localdesc, sal_stream_type);
const SalStreamDescription * remote_desc = get_media_stream_for_desc(sal_call_get_remote_media_description(call->op), sal_stream_type);
@ -433,13 +434,13 @@ static void qos_analyzer_on_action_suggested(void *user_data, int datac, const c
char * appendbuf;
int i;
int ptime = -1;
int bitrate[2] = {-1, -1};
int up_bw[2] = {-1, -1};
int down_bw[2] = {-1, -1};
MediaStream *streams[2] = {(MediaStream*) call->audiostream, (MediaStream *) call->videostream};
for (i=0;i<2;i++){
if (streams[i]!=NULL){
if (streams[i]->encoder!=NULL){
int bitrate[3] = {-1, -1, -1};
int up_bw[3] = {-1, -1, -1};
int down_bw[3] = {-1, -1, -1};
MediaStream *streams[3] = { (MediaStream*) call->audiostream, (MediaStream *) call->videostream, (MediaStream *) call->textstream };
for (i = 0; i < 3; i++){
if (streams[i] != NULL){
if (streams[i]->encoder != NULL){
if (ms_filter_has_method(streams[i]->encoder,MS_FILTER_GET_BITRATE)){
ms_filter_call_method(streams[i]->encoder,MS_FILTER_GET_BITRATE,&bitrate[i]);
bitrate[i] /= 1000;
@ -460,9 +461,9 @@ static void qos_analyzer_on_action_suggested(void *user_data, int datac, const c
appendbuf=ms_strdup_printf("%s%d;", report->qos_analyzer.timestamp?report->qos_analyzer.timestamp:"", ms_time(0));
STR_REASSIGN(report->qos_analyzer.timestamp,appendbuf);
STR_REASSIGN(report->qos_analyzer.input_leg, ms_strdup_printf("%s aenc_ptime aenc_br a_dbw a_ubw venc_br v_dbw v_ubw", datav[0]));
appendbuf=ms_strdup_printf("%s%s %d %d %d %d %d %d %d;", report->qos_analyzer.input?report->qos_analyzer.input:"", datav[1],
ptime, bitrate[0], down_bw[0], up_bw[0], bitrate[1], down_bw[1], up_bw[1] );
STR_REASSIGN(report->qos_analyzer.input_leg, ms_strdup_printf("%s aenc_ptime aenc_br a_dbw a_ubw venc_br v_dbw v_ubw tenc_br t_dbw t_ubw", datav[0]));
appendbuf=ms_strdup_printf("%s%s %d %d %d %d %d %d %d %d %d %d;", report->qos_analyzer.input?report->qos_analyzer.input:"", datav[1],
ptime, bitrate[0], down_bw[0], up_bw[0], bitrate[1], down_bw[1], up_bw[1], bitrate[2], down_bw[2], up_bw[2]);
STR_REASSIGN(report->qos_analyzer.input,appendbuf);
STR_REASSIGN(report->qos_analyzer.output_leg, ms_strdup(datav[2]));
appendbuf=ms_strdup_printf("%s%s;", report->qos_analyzer.output?report->qos_analyzer.output:"", datav[3]);
@ -472,6 +473,7 @@ static void qos_analyzer_on_action_suggested(void *user_data, int datac, const c
void linphone_reporting_update_ip(LinphoneCall * call) {
update_ip(call, LINPHONE_CALL_STATS_AUDIO);
update_ip(call, LINPHONE_CALL_STATS_VIDEO);
update_ip(call, LINPHONE_CALL_STATS_TEXT);
}
void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
@ -496,15 +498,15 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
// RFC states: "LocalGroupID provides the identification for the purposes
// of aggregation for the local endpoint.".
STR_REASSIGN(report->info.local_addr.group, ms_strdup_printf("%s-%s-%s"
, dialog_id
, dialog_id ? dialog_id : ""
, "local"
, report->local_metrics.user_agent
, report->local_metrics.user_agent ? report->local_metrics.user_agent : ""
)
);
STR_REASSIGN(report->info.remote_addr.group, ms_strdup_printf("%s-%s-%s"
, dialog_id
, dialog_id ? dialog_id : ""
, "remote"
, report->remote_metrics.user_agent
, report->remote_metrics.user_agent ? report->remote_metrics.user_agent : ""
)
);
@ -537,6 +539,10 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
stream = &call->videostream->ms;
local_payload = linphone_call_params_get_used_video_codec(current_params);
remote_payload = local_payload;
} else if (stats_type == LINPHONE_CALL_STATS_TEXT && call->textstream != NULL) {
stream = &call->textstream->ms;
local_payload = linphone_call_params_get_used_text_codec(current_params);
remote_payload = local_payload;
}
if (stream != NULL) {
@ -553,7 +559,7 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
}
}
STR_REASSIGN(report->dialog_id, ms_strdup_printf("%s;%u", dialog_id, report->info.local_addr.ssrc));
STR_REASSIGN(report->dialog_id, ms_strdup_printf("%s;%u", dialog_id ? dialog_id : "", report->info.local_addr.ssrc));
if (local_payload != NULL) {
report->local_metrics.session_description.payload_type = local_payload->type;
@ -644,11 +650,12 @@ void linphone_reporting_on_rtcp_update(LinphoneCall *call, SalStreamType stats_t
static int publish_report(LinphoneCall *call, const char *event_type){
int ret = 0;
int i;
for (i = 0; i < 2; i++){
if (media_report_enabled(call, i)){
for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; i++){
int stream_index = i == call->main_audio_stream_index ? LINPHONE_CALL_STATS_AUDIO : call->main_video_stream_index ? LINPHONE_CALL_STATS_VIDEO : LINPHONE_CALL_STATS_TEXT;
if (media_report_enabled(call, stream_index)) {
int sndret;
linphone_reporting_update_media_info(call, i);
sndret=send_report(call, call->log->reporting.reports[i], event_type);
linphone_reporting_update_media_info(call, stream_index);
sndret=send_report(call, call->log->reporting.reports[stream_index], event_type);
if (sndret>0){
ret += 10+(i+1)*sndret;
}
@ -689,12 +696,13 @@ void linphone_reporting_call_state_updated(LinphoneCall *call){
switch (state){
case LinphoneCallStreamsRunning:{
int i = 0;
MediaStream *streams[2] = {(MediaStream*) call->audiostream, (MediaStream *) call->videostream};
for (i=0;i<2;i++) {
bool_t enabled=media_report_enabled(call, i);
if (enabled && set_on_action_suggested_cb(streams[i], qos_analyzer_on_action_suggested, call->log->reporting.reports[i])) {
call->log->reporting.reports[i]->call=call;
STR_REASSIGN(call->log->reporting.reports[i]->qos_analyzer.name, ms_strdup(ms_qos_analyzer_get_name(ms_bitrate_controller_get_qos_analyzer(streams[i]->rc))));
MediaStream *streams[3] = { (MediaStream*) call->audiostream, (MediaStream *) call->videostream, (MediaStream *) call->textstream };
for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; i++) {
int stream_index = i == call->main_audio_stream_index ? LINPHONE_CALL_STATS_AUDIO : call->main_video_stream_index ? LINPHONE_CALL_STATS_VIDEO : LINPHONE_CALL_STATS_TEXT;
bool_t enabled = media_report_enabled(call, stream_index);
if (enabled && set_on_action_suggested_cb(streams[stream_index], qos_analyzer_on_action_suggested, call->log->reporting.reports[stream_index])) {
call->log->reporting.reports[stream_index]->call=call;
STR_REASSIGN(call->log->reporting.reports[stream_index]->qos_analyzer.name, ms_strdup(ms_qos_analyzer_get_name(ms_bitrate_controller_get_qos_analyzer(streams[stream_index]->rc))));
}
}
linphone_reporting_update_ip(call);

View file

@ -203,16 +203,51 @@ bool_t sal_stream_description_active(const SalStreamDescription *sd) {
return (sd->rtp_port > 0);
}
/*these are switch case, so that when a new proto is added we can't forget to modify this function*/
bool_t sal_stream_description_has_avpf(const SalStreamDescription *sd) {
return ((sd->proto == SalProtoRtpAvpf) || (sd->proto == SalProtoRtpSavpf) || (sd->proto == SalProtoUdpTlsRtpSavpf));
switch (sd->proto){
case SalProtoRtpAvpf:
case SalProtoRtpSavpf:
case SalProtoUdpTlsRtpSavpf:
return TRUE;
case SalProtoRtpAvp:
case SalProtoRtpSavp:
case SalProtoUdpTlsRtpSavp:
case SalProtoOther:
return FALSE;
}
return FALSE;
}
/*these are switch case, so that when a new proto is added we can't forget to modify this function*/
bool_t sal_stream_description_has_srtp(const SalStreamDescription *sd) {
return ((sd->proto == SalProtoRtpSavp) || (sd->proto == SalProtoRtpSavpf));
switch (sd->proto){
case SalProtoRtpSavp:
case SalProtoRtpSavpf:
return TRUE;
case SalProtoRtpAvp:
case SalProtoRtpAvpf:
case SalProtoUdpTlsRtpSavpf:
case SalProtoUdpTlsRtpSavp:
case SalProtoOther:
return FALSE;
}
return FALSE;
}
bool_t sal_stream_description_has_dtls(const SalStreamDescription *sd) {
return ((sd->proto == SalProtoUdpTlsRtpSavp) || (sd->proto == SalProtoUdpTlsRtpSavpf));
switch (sd->proto){
case SalProtoUdpTlsRtpSavpf:
case SalProtoUdpTlsRtpSavp:
return TRUE;
case SalProtoRtpSavp:
case SalProtoRtpSavpf:
case SalProtoRtpAvp:
case SalProtoRtpAvpf:
case SalProtoOther:
return FALSE;
}
return FALSE;
}
bool_t sal_media_description_has_avpf(const SalMediaDescription *md) {

View file

@ -55,111 +55,114 @@ static void cleanup_dead_vtable_refs(LinphoneCore *lc){
}
}
#define NOTIFY_IF_EXIST(function_name) \
#define NOTIFY_IF_EXIST(function_name, ...) \
MSList* iterator; \
VTableReference *ref; \
ms_message("Linphone core [%p] notifying [%s]",lc,#function_name);\
for (iterator=lc->vtable_refs; iterator!=NULL; iterator=iterator->next) \
if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name)\
lc->current_vtable->function_name
bool_t has_cb = FALSE; \
for (iterator=lc->vtable_refs; iterator!=NULL; iterator=iterator->next)\
if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name) {\
lc->current_vtable->function_name(__VA_ARGS__);\
has_cb = TRUE;\
}\
if (has_cb) ms_message("Linphone core [%p] notifying [%s]",lc,#function_name)
void linphone_core_notify_global_state_changed(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message) {
NOTIFY_IF_EXIST(global_state_changed)(lc,gstate,message);
NOTIFY_IF_EXIST(global_state_changed,lc,gstate,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message){
NOTIFY_IF_EXIST(call_state_changed)(lc,call,cstate,message);
NOTIFY_IF_EXIST(call_state_changed, lc,call,cstate,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_call_encryption_changed(LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token) {
NOTIFY_IF_EXIST(call_encryption_changed)(lc,call,on,authentication_token);
NOTIFY_IF_EXIST(call_encryption_changed, lc,call,on,authentication_token);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message){
NOTIFY_IF_EXIST(registration_state_changed)(lc,cfg,cstate,message);
NOTIFY_IF_EXIST(registration_state_changed, lc,cfg,cstate,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_show_interface(LinphoneCore *lc){
NOTIFY_IF_EXIST(show)(lc);
NOTIFY_IF_EXIST(show, lc);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_display_status(LinphoneCore *lc, const char *message) {
NOTIFY_IF_EXIST(display_status)(lc,message);
NOTIFY_IF_EXIST(display_status, lc,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_display_message(LinphoneCore *lc, const char *message){
NOTIFY_IF_EXIST(display_message)(lc,message);
NOTIFY_IF_EXIST(display_message, lc,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_display_warning(LinphoneCore *lc, const char *message){
NOTIFY_IF_EXIST(display_warning)(lc,message);
NOTIFY_IF_EXIST(display_warning, lc,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_display_url(LinphoneCore *lc, const char *message, const char *url){
NOTIFY_IF_EXIST(display_url)(lc,message,url);
NOTIFY_IF_EXIST(display_url, lc,message,url);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf){
NOTIFY_IF_EXIST(notify_presence_received)(lc,lf);
NOTIFY_IF_EXIST(notify_presence_received, lc,lf);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_new_subscription_requested(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
NOTIFY_IF_EXIST(new_subscription_requested)(lc,lf,url);
NOTIFY_IF_EXIST(new_subscription_requested, lc,lf,url);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username, const char *domain){
NOTIFY_IF_EXIST(auth_info_requested)(lc,realm,username,domain);
NOTIFY_IF_EXIST(auth_info_requested, lc,realm,username,domain);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_call_log_updated(LinphoneCore *lc, LinphoneCallLog *newcl){
NOTIFY_IF_EXIST(call_log_updated)(lc,newcl);
NOTIFY_IF_EXIST(call_log_updated, lc,newcl);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_text_message_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message){
NOTIFY_IF_EXIST(text_received)(lc,room,from,message);
NOTIFY_IF_EXIST(text_received, lc,room,from,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message){
NOTIFY_IF_EXIST(message_received)(lc,room,message);
NOTIFY_IF_EXIST(message_received, lc,room,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_file_transfer_recv(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, const char* buff, size_t size) {
NOTIFY_IF_EXIST(file_transfer_recv)(lc,message,content,buff,size);
NOTIFY_IF_EXIST(file_transfer_recv, lc,message,content,buff,size);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_file_transfer_send(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, char* buff, size_t* size) {
NOTIFY_IF_EXIST(file_transfer_send)(lc,message,content,buff,size);
NOTIFY_IF_EXIST(file_transfer_send, lc,message,content,buff,size);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_file_transfer_progress_indication(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, size_t offset, size_t total) {
NOTIFY_IF_EXIST(file_transfer_progress_indication)(lc,message,content,offset,total);
NOTIFY_IF_EXIST(file_transfer_progress_indication, lc,message,content,offset,total);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room) {
NOTIFY_IF_EXIST(is_composing_received)(lc,room);
NOTIFY_IF_EXIST(is_composing_received, lc,room);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_dtmf_received(LinphoneCore* lc, LinphoneCall *call, int dtmf) {
NOTIFY_IF_EXIST(dtmf_received)(lc,call,dtmf);
NOTIFY_IF_EXIST(dtmf_received, lc,call,dtmf);
cleanup_dead_vtable_refs(lc);
}
@ -174,62 +177,62 @@ bool_t linphone_core_dtmf_received_has_listener(const LinphoneCore* lc) {
}
void linphone_core_notify_refer_received(LinphoneCore *lc, const char *refer_to) {
NOTIFY_IF_EXIST(refer_received)(lc,refer_to);
NOTIFY_IF_EXIST(refer_received, lc,refer_to);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf) {
NOTIFY_IF_EXIST(buddy_info_updated)(lc,lf);
NOTIFY_IF_EXIST(buddy_info_updated, lc,lf);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_transfer_state_changed(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state) {
NOTIFY_IF_EXIST(transfer_state_changed)(lc,transfered,new_call_state);
NOTIFY_IF_EXIST(transfer_state_changed, lc,transfered,new_call_state);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_call_stats_updated(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallStats *stats) {
NOTIFY_IF_EXIST(call_stats_updated)(lc,call,stats);
NOTIFY_IF_EXIST(call_stats_updated, lc,call,stats);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_info_received(LinphoneCore *lc, LinphoneCall *call, const LinphoneInfoMessage *msg) {
NOTIFY_IF_EXIST(info_received)(lc,call,msg);
NOTIFY_IF_EXIST(info_received, lc,call,msg);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_configuring_status(LinphoneCore *lc, LinphoneConfiguringState status, const char *message) {
NOTIFY_IF_EXIST(configuring_status)(lc,status,message);
NOTIFY_IF_EXIST(configuring_status, lc,status,message);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_network_reachable(LinphoneCore *lc, bool_t reachable) {
NOTIFY_IF_EXIST(network_reachable)(lc,reachable);
NOTIFY_IF_EXIST(network_reachable, lc,reachable);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_notify_received(LinphoneCore *lc, LinphoneEvent *lev, const char *notified_event, const LinphoneContent *body) {
NOTIFY_IF_EXIST(notify_received)(lc,lev,notified_event,body);
NOTIFY_IF_EXIST(notify_received, lc,lev,notified_event,body);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_subscription_state_changed(LinphoneCore *lc, LinphoneEvent *lev, LinphoneSubscriptionState state) {
NOTIFY_IF_EXIST(subscription_state_changed)(lc,lev,state);
NOTIFY_IF_EXIST(subscription_state_changed, lc,lev,state);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_publish_state_changed(LinphoneCore *lc, LinphoneEvent *lev, LinphonePublishState state) {
NOTIFY_IF_EXIST(publish_state_changed)(lc,lev,state);
NOTIFY_IF_EXIST(publish_state_changed, lc,lev,state);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_log_collection_upload_state_changed(LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state, const char *info) {
NOTIFY_IF_EXIST(log_collection_upload_state_changed)(lc, state, info);
NOTIFY_IF_EXIST(log_collection_upload_state_changed, lc, state, info);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_log_collection_upload_progress_indication(LinphoneCore *lc, size_t offset, size_t total) {
NOTIFY_IF_EXIST(log_collection_upload_progress_indication)(lc, offset, total);
NOTIFY_IF_EXIST(log_collection_upload_progress_indication, lc, offset, total);
cleanup_dead_vtable_refs(lc);
}

View file

@ -154,10 +154,11 @@ static void linphone_gtk_call_selected(GtkTreeView *treeview){
}
static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
GtkWidget *menu=gtk_menu_new();
GtkWidget *menu=NULL;
GtkWidget *menu_item;
gchar *call_label=NULL;
gchar *text_label=NULL;
gchar *add_contact_label=NULL;
gchar *name=NULL;
GtkWidget *image;
GtkTreeSelection *select;
@ -176,34 +177,44 @@ static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
name=linphone_address_as_string(la);
call_label=g_strdup_printf(_("Call %s"),name);
text_label=g_strdup_printf(_("Send text to %s"),name);
add_contact_label=g_strdup_printf(_("Add %s to your contact list"),name);
ms_free(name);
menu=gtk_menu_new();
}
}
if (call_label){
if (menu && call_label){
menu_item=gtk_image_menu_item_new_with_label(call_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-call",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,call_log);
}
if (text_label){
if (menu && text_label){
menu_item=gtk_image_menu_item_new_with_label(text_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-chat",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_chat_selected,call_log);
}
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_add_contact,call_log);
gtk_widget_show(menu);
gtk_menu_attach_to_widget(GTK_MENU(menu),call_log, NULL);
if (menu && add_contact_label){
menu_item=gtk_image_menu_item_new_with_label(add_contact_label);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_add_contact,call_log);
}
if (menu) {
gtk_widget_show(menu);
gtk_menu_attach_to_widget(GTK_MENU(menu),call_log, NULL);
}
if (add_contact_label) g_free(add_contact_label);
if (call_label) g_free(call_label);
if (text_label) g_free(text_label);
return menu;
@ -211,9 +222,12 @@ static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
gboolean linphone_gtk_call_log_popup_contact(GtkWidget *list, GdkEventButton *event){
GtkWidget *m=linphone_gtk_create_call_log_menu(list);
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
return TRUE;
if (m) {
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
return TRUE;
}
return FALSE;
}
gboolean linphone_gtk_call_log_button_pressed(GtkWidget *widget, GdkEventButton *event){
@ -228,7 +242,7 @@ void linphone_gtk_call_log_clear_missed_call(){
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(mw,"viewswitch"));
GtkWidget *page=gtk_notebook_get_nth_page(notebook,0);
GtkWidget *box=gtk_hbox_new(FALSE,0);
GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
GtkWidget *image=gtk_image_new_from_icon_name("linphone-history",GTK_ICON_SIZE_MENU);
GtkWidget *l;
const gchar*text=gtk_label_get_text(GTK_LABEL(linphone_gtk_get_widget(mw,"label3")));
@ -254,7 +268,7 @@ void linphone_gtk_call_log_display_missed_call(int nb){
GtkWidget *page=gtk_notebook_get_nth_page(notebook,0);
GtkWidget *ebox=gtk_event_box_new();
GtkWidget *box=gtk_hbox_new(FALSE,0);
GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
GtkWidget *image=gtk_image_new_from_icon_name("linphone-history",GTK_ICON_SIZE_MENU);
GtkWidget *l;
gchar *buf;

View file

@ -92,7 +92,6 @@ void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
g_return_if_fail(w!=NULL);
gtk_notebook_remove_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),w));
linphone_chat_room_mark_as_read(cr);
linphone_gtk_friend_list_update_chat_picture();
g_object_set_data(G_OBJECT(friendlist),"chatview",NULL);
from=g_object_get_data(G_OBJECT(w),"from_message");
if (from){
@ -113,44 +112,16 @@ const char* get_display_name(const LinphoneAddress *from){
return display;
}
GtkWidget *create_tab_chat_header(LinphoneChatRoom *cr,const LinphoneAddress *uri){
GtkWidget *w=gtk_hbox_new (FALSE,0);
GtkWidget *i = gtk_image_new_from_icon_name("linphone-chat-nothing", GTK_ICON_SIZE_BUTTON);
GtkWidget *l;
GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_CLOSE,GTK_ICON_SIZE_MENU);
GtkWidget *b=gtk_button_new();
gtk_button_set_image(GTK_BUTTON(b),image);
gtk_button_set_relief(GTK_BUTTON(b),GTK_RELIEF_NONE);
gtk_widget_set_size_request(b,25,20);
g_signal_connect_swapped(G_OBJECT(b),"clicked",G_CALLBACK(linphone_gtk_quit_chatroom),cr);
l=gtk_label_new(get_display_name(uri));
gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
gtk_box_pack_start (GTK_BOX(w),l,FALSE,FALSE,0);
gtk_box_pack_end(GTK_BOX(w),b,TRUE,TRUE,0);
gtk_widget_show_all(w);
return w;
GtkWidget *create_tab_chat_header(LinphoneChatRoom *cr, const LinphoneAddress *uri){
GtkWidget *tab_header = linphone_gtk_make_tab_header(get_display_name(uri), "linphone-start-chat", TRUE, G_CALLBACK(linphone_gtk_quit_chatroom), cr);
gtk_widget_show_all(tab_header);
return tab_header;
}
void udpate_tab_chat_header(GtkWidget *chat_view,const LinphoneAddress *uri,LinphoneChatRoom *cr){
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
GtkWidget *w=gtk_hbox_new (FALSE,0);
GtkWidget *i=create_pixmap ("chat.png");
GtkWidget *l;
GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_CLOSE,GTK_ICON_SIZE_MENU);
GtkWidget *b=gtk_button_new();
gtk_button_set_image(GTK_BUTTON(b),image);
gtk_button_set_relief(GTK_BUTTON(b),GTK_RELIEF_NONE);
gtk_widget_set_size_request(b,25,20);
g_signal_connect_swapped(G_OBJECT(b),"clicked",G_CALLBACK(linphone_gtk_quit_chatroom),cr);
l=gtk_label_new (get_display_name(uri));
gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
gtk_box_pack_start (GTK_BOX(w),l,FALSE,FALSE,0);
gtk_box_pack_end(GTK_BOX(w),b,TRUE,TRUE,0);
gtk_notebook_set_tab_label(notebook,chat_view,w);
gtk_widget_show_all(w);
void update_chat_header(GtkNotebook *notebook, GtkWidget *chat_view, LinphoneChatRoom *cr, const LinphoneAddress *uri) {
GtkWidget *header = linphone_gtk_make_tab_header(get_display_name(uri), "linphone-start-chat", TRUE, G_CALLBACK(linphone_gtk_quit_chatroom), cr);
gtk_widget_show_all(header);
gtk_notebook_set_tab_label(notebook, chat_view, header);
}
static gboolean scroll_to_end(GtkTextView *w){
@ -319,7 +290,7 @@ void linphone_gtk_compose_text(void) {
if (cr) {
linphone_chat_room_compose(cr);
linphone_chat_room_mark_as_read(cr);
linphone_gtk_friend_list_update_chat_picture();
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
}
}
@ -417,6 +388,8 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
GtkTextIter uri_end = *iter;
gchar *uri = NULL;
LinphoneChatRoom *chat_room = (LinphoneChatRoom *)g_object_get_data(G_OBJECT(chat_view), "cr");
GtkWidget *main_window = linphone_gtk_get_main_window();
GtkWidget *friendlist = linphone_gtk_get_widget(main_window, "contact_list");
gtk_text_iter_backward_to_tag_toggle(&uri_begin, tag);
gtk_text_iter_forward_to_tag_toggle(&uri_end, tag);
@ -431,7 +404,7 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
g_free(uri);
linphone_chat_room_mark_as_read(chat_room);
linphone_gtk_friend_list_update_chat_picture();
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
return TRUE;
}
@ -576,6 +549,7 @@ LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with){
void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view){
GtkWidget *main_window=linphone_gtk_get_main_window ();
GtkWidget *notebook = linphone_gtk_get_widget(main_window, "viewswitch");
LinphoneChatRoom *cr2=(LinphoneChatRoom *)g_object_get_data(G_OBJECT(chat_view),"cr");
const LinphoneAddress *from=linphone_chat_room_get_peer_address(cr2);
char *from_str=linphone_address_as_string_uri_only(from);
@ -592,7 +566,7 @@ void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,
text_buffer=gtk_text_view_get_buffer(text_view);
gtk_text_buffer_get_bounds(text_buffer, &start, &end);
gtk_text_buffer_delete (text_buffer, &start, &end);
udpate_tab_chat_header(chat_view,uri,cr);
update_chat_header(GTK_NOTEBOOK(notebook), chat_view, cr, uri);
g_object_set_data(G_OBJECT(chat_view),"cr",cr);
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(main_window,"contact_list")),"chatview",(gpointer)chat_view);
messages=linphone_chat_room_get_history(cr,NB_MSG_HIST);
@ -672,5 +646,7 @@ void linphone_gtk_text_received ( LinphoneCore *lc, LinphoneChatRoom *room,
}
void linphone_gtk_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room) {
linphone_gtk_friend_list_update_chat_picture();
GtkWidget *main_window = linphone_gtk_get_main_window();
GtkWidget *friendlist = linphone_gtk_get_widget(main_window, "contact_list");
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
}

View file

@ -43,11 +43,10 @@
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="conf_record_button">
<property name="label">gtk-media-record</property>
<property name="label" translatable="yes">Record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>

View file

@ -34,7 +34,7 @@
static GtkWidget *create_conference_label(void){
GtkWidget *box=gtk_hbox_new(FALSE,0);
gtk_box_pack_start(GTK_BOX(box),gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU),FALSE,FALSE,0);
gtk_box_pack_start(GTK_BOX(box),gtk_image_new_from_icon_name("linphone-conference-start",GTK_ICON_SIZE_MENU),FALSE,FALSE,0);
gtk_box_pack_end(GTK_BOX(box),gtk_label_new(_("Conference")),TRUE,FALSE,0);
gtk_widget_show_all(box);
return box;
@ -88,7 +88,9 @@ static GtkWidget * create_conference_panel(void){
GtkWidget *box;
GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
GtkWidget *participant;
GtkWidget *record = linphone_gtk_get_widget(conf_frame, "conf_record_button");
gtk_button_set_image(GTK_BUTTON(record), gtk_image_new_from_icon_name("linphone-record", GTK_ICON_SIZE_BUTTON));
gtk_button_set_image(GTK_BUTTON(button_conf),image);
g_signal_connect_swapped(G_OBJECT(button_conf),"clicked",(GCallback)linphone_gtk_terminate_call,NULL);
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);

View file

@ -29,6 +29,8 @@ enum{
FRIEND_CHATROOM,
FRIEND_SIP_ADDRESS,
FRIEND_CHAT,
FRIEND_CALL_BUTTON_VISIBLE,
FRIEND_CHAT_BUTTON_VISIBLE,
FRIEND_LIST_NCOL
};
@ -180,30 +182,55 @@ static void linphone_gtk_call_selected(GtkTreeView *treeview){
"start_call"));
}
void linphone_gtk_friend_list_update_chat_picture(){
GtkTreeIter iter;
GtkWidget *w = linphone_gtk_get_main_window();
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist){
GtkTreeIter iter, selected_iter;
GtkTreeModel *model=gtk_tree_view_get_model(friendlist);
GtkTreeSelection *select=gtk_tree_view_get_selection(friendlist);
LinphoneChatRoom *cr=NULL;
bool_t is_composing;
gboolean is_composing;
int nbmsg=0;
GtkTreePath *selected_path = NULL;
GtkTreePath *hovered_row = (GtkTreePath *)g_object_get_data(G_OBJECT(friendlist), "hovered_row");
if (gtk_tree_selection_get_selected(select, &model, &selected_iter)){
selected_path = gtk_tree_model_get_path(model, &selected_iter);
}
if (gtk_tree_model_get_iter_first(model,&iter)) {
do{
const char *icon_name = NULL;
gboolean show_chat_button = FALSE;
gboolean show_call_button = FALSE;
GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
gtk_tree_model_get (model, &iter,FRIEND_CHATROOM , &cr, -1);
nbmsg=linphone_chat_room_get_unread_messages_count(cr);
is_composing=linphone_chat_room_is_remote_composing(cr);
if(nbmsg != 0){
if (is_composing == TRUE) icon_name = "linphone-chat-new-message-and-writing";
if (is_composing) icon_name = "linphone-chat-new-message-and-writing";
else icon_name = "linphone-chat-new-message";
show_chat_button = TRUE;
} else {
if (is_composing == TRUE) icon_name = "linphone-chat-writing";
else icon_name = "linphone-chat-nothing";
if (is_composing) {
icon_name = "linphone-chat-writing";
show_chat_button = TRUE;
} else {
icon_name = "linphone-chat-nothing";
}
}
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,icon_name,-1);
if ((selected_path && gtk_tree_path_compare(path, selected_path) == 0)
|| (hovered_row && gtk_tree_path_compare(path, hovered_row) == 0)){
show_chat_button = TRUE;
show_call_button = TRUE;
}
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,icon_name,
FRIEND_CHAT_BUTTON_VISIBLE, show_chat_button, -1);
gtk_list_store_set(GTK_LIST_STORE(model), &iter, FRIEND_CALL_BUTTON_VISIBLE, show_call_button, -1);
gtk_tree_path_free(path);
}while(gtk_tree_model_iter_next(model,&iter));
}
if (selected_path) gtk_tree_path_free(selected_path);
}
static gboolean grab_focus(GtkWidget *w){
@ -245,7 +272,7 @@ void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la){
linphone_gtk_load_chatroom(cr,la,chat_view);
}
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,chat_view));
linphone_gtk_friend_list_update_chat_picture();
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(chat_view));
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(chat_view,"text_entry"));
} else {
store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
@ -268,7 +295,7 @@ void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la){
linphone_gtk_load_chatroom(cr,uri,chat_view);
}
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,chat_view));
linphone_gtk_friend_list_update_chat_picture();
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(chat_view));
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(chat_view,"text_entry"));
break;
}
@ -318,7 +345,7 @@ void linphone_gtk_chat_selected(GtkWidget *item){
cr=linphone_gtk_create_chatroom(uri);
gtk_list_store_set(store,&iter,FRIEND_CHATROOM,cr,-1);
}
page=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
page=GTK_WIDGET(g_object_get_data(G_OBJECT(friendlist),"chatview"));
linphone_gtk_friend_list_set_active_address(uri);
if(page==NULL){
page=linphone_gtk_init_chatroom(cr,uri);
@ -328,29 +355,14 @@ void linphone_gtk_chat_selected(GtkWidget *item){
}
linphone_chat_room_mark_as_read(cr);
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
linphone_gtk_friend_list_update_chat_picture();
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
}
}
void linphone_gtk_contact_activated(GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data)
{
//linphone_gtk_call_selected(treeview);
}
void linphone_gtk_contact_clicked(GtkTreeView *treeview){
linphone_gtk_set_selection_to_uri_bar(treeview);
if(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview),"numcol"))==1){
linphone_gtk_call_selected(treeview);
} else {
if(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview),"numcol"))==2){
linphone_gtk_chat_selected(GTK_WIDGET(treeview));
}
}
g_object_set_data(G_OBJECT(treeview),"numcol",GINT_TO_POINTER(0));
void linphone_gtk_contact_clicked(GtkTreeSelection *selection){
GtkTreeView *friendlist = gtk_tree_selection_get_tree_view(selection);
linphone_gtk_set_selection_to_uri_bar(friendlist);
linphone_gtk_friend_list_update_button_display(friendlist);
}
@ -434,11 +446,12 @@ static void icon_press_handler(GtkEntry *entry){
}
static void update_star(GtkEntry *entry, gboolean is_known){
gtk_entry_set_icon_from_icon_name(entry,GTK_ENTRY_ICON_SECONDARY,"linphone-contact-add");
if (is_known){
gtk_entry_set_icon_from_icon_name(entry,GTK_ENTRY_ICON_SECONDARY,"linphone-contact-bookmarked");
gtk_entry_set_icon_sensitive(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,FALSE);
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,NULL);
}else{
gtk_entry_set_icon_from_icon_name(entry,GTK_ENTRY_ICON_SECONDARY,"linphone-contact-not-bookmarked");
gtk_entry_set_icon_sensitive(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,TRUE);
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,_("Add to addressbook"));
}
}
@ -588,15 +601,6 @@ void linphone_gtk_friend_list_on_presence_column_clicked(GtkTreeModel *model){
}
#endif
void create_button(){
GtkWidget *main_window = linphone_gtk_get_main_window ();
GtkWidget *button_add = linphone_gtk_get_widget(main_window,"add_button");
GtkWidget *image;
image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (button_add), image);
}
static void linphone_gtk_friend_list_init(GtkWidget *friendlist){
GtkTreeModel *store = gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
@ -605,6 +609,7 @@ static void linphone_gtk_friend_list_init(GtkWidget *friendlist){
gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(friendlist),friend_search_func,NULL,NULL);
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(store),FRIEND_NAME,friend_sort,NULL,NULL);
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(linphone_gtk_contact_clicked), NULL);
g_object_set_data(G_OBJECT(friendlist), "friendlist_initialized", (gpointer)TRUE);
}
@ -800,6 +805,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
gchar *edit_label=NULL;
gchar *delete_label=NULL;
gchar *delete_hist_label=NULL;
gchar *add_contact_label=NULL;
gchar *name=NULL;
GtkTreeSelection *select;
GtkTreeIter iter;
@ -808,6 +814,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
LinphoneCore *lc=linphone_gtk_get_core();
LinphoneProxyConfig *cfg=NULL;
SipSetupContext * ssc=NULL;
bool_t show_menu_separator=FALSE;
linphone_core_get_default_proxy(lc,&cfg);
if (cfg){
@ -816,6 +823,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
add_contact_label=g_strdup_printf(_("Add a new contact"));
if (gtk_tree_selection_get_selected (select, &model, &iter)){
gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
call_label=g_strdup_printf(_("Call %s"),name);
@ -824,10 +832,11 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
delete_hist_label=g_strdup_printf(_("Delete chat history of '%s'"),name);
g_free(name);
show_menu_separator=TRUE;
}
if (call_label){
menu_item=gtk_image_menu_item_new_with_label(call_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-call",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
@ -836,7 +845,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (text_label){
menu_item=gtk_image_menu_item_new_with_label(text_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-chat",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
@ -845,7 +854,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (edit_label){
menu_item=gtk_image_menu_item_new_with_label(edit_label);
image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-edit",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
@ -854,7 +863,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (delete_label){
menu_item=gtk_image_menu_item_new_with_label(delete_label);
image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-delete",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
@ -876,22 +885,31 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
menu_item=gtk_image_menu_item_new_with_label(tmp);
g_free(tmp);
image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
gtk_widget_show(menu);
}
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
if (show_menu_separator) {
GtkWidget *menu_item_separator=gtk_separator_menu_item_new();
gtk_widget_show(menu_item_separator);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_separator);
}
menu_item=gtk_image_menu_item_new_with_label(add_contact_label);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
gtk_widget_show(menu);
gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
g_free(add_contact_label);
if (call_label) g_free(call_label);
if (text_label) g_free(text_label);
if (edit_label) g_free(edit_label);
@ -906,61 +924,75 @@ gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event)
return TRUE;
}
gint get_col_number_from_tree_view_column (GtkTreeViewColumn *col){
GList *cols;
gint num;
g_return_val_if_fail ( col != NULL, -1 );
g_return_val_if_fail ( col->tree_view != NULL, -1 );
cols = gtk_tree_view_get_columns(GTK_TREE_VIEW(col->tree_view));
num = g_list_index(cols, (gpointer) col);
g_list_free(cols);
return num;
static int get_column_index(GtkTreeView *friendlist, const GtkTreeViewColumn *column) {
GList *columns = gtk_tree_view_get_columns(friendlist);
int i = g_list_index(columns, column);
g_list_free(columns);
return i;
}
static gint tree_view_get_cell_from_pos(GtkTreeView *view, guint x, guint y){
GtkTreeViewColumn *col = NULL;
GList *node, *columns;
gint colx = 0;
GtkTreePath *path;
GtkTreeViewDropPosition pos;
g_return_val_if_fail ( view != NULL, 0 );
columns = gtk_tree_view_get_columns(view);
gtk_tree_view_get_dest_row_at_pos(view,x,y,&path,&pos);
if(path != NULL){
for (node = columns; node != NULL && col == NULL; node = node->next){
GtkTreeViewColumn *checkcol = (GtkTreeViewColumn*) node->data;
if (x >= colx && x < (colx + checkcol->width)){
col = checkcol;
return get_col_number_from_tree_view_column(col);
} else {
colx += checkcol->width;
}
}
}
g_list_free(columns);
return 0;
static void select_row(GtkTreeView *treeview, GtkTreePath *path) {
GtkTreeSelection *selection = gtk_tree_view_get_selection(treeview);
gtk_tree_selection_select_path(selection, path);
}
gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
/* Ignore double-clicks and triple-clicks */
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
{
GtkTreeView *friendlist = GTK_TREE_VIEW(widget);
gboolean ret = FALSE;
if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
return linphone_gtk_popup_contact_menu(widget, event);
} else if(event->button == 1 && event->type == GDK_BUTTON_PRESS){
gint numcol = tree_view_get_cell_from_pos(GTK_TREE_VIEW(widget),event->x,event->y);
if(numcol==2){
g_object_set_data(G_OBJECT(widget),"numcol",GINT_TO_POINTER(1));
} else if(numcol==3){
g_object_set_data(G_OBJECT(widget),"numcol",GINT_TO_POINTER(2));
int x_bin, y_bin;
GtkTreePath *path;
GtkTreeViewColumn *column;
gtk_tree_view_convert_widget_to_bin_window_coords(friendlist, event->x, event->y, &x_bin, &y_bin);
gtk_tree_view_get_path_at_pos(friendlist, x_bin, y_bin, &path, &column, NULL, NULL);
if(path && column) {
int numcol = get_column_index(friendlist, column);
if(numcol == 2) {
select_row(friendlist, path);
linphone_gtk_call_selected(GTK_TREE_VIEW(widget));
ret = TRUE;
} else if(numcol == 3) {
select_row(friendlist, path);
linphone_gtk_chat_selected(widget);
ret = TRUE;
}
}
if(path) gtk_tree_path_free(path);
}
return FALSE;
return ret;
}
void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
/*refresh the entire list*/
linphone_gtk_show_friends();
}
static void update_hovered_row_path(GtkTreeView *friendlist, int x_window, int y_window) {
int x_bin, y_bin;
GtkTreePath *path;
gtk_tree_view_convert_widget_to_bin_window_coords(friendlist, x_window, y_window, &x_bin, &y_bin);
gtk_tree_view_get_path_at_pos(friendlist, x_bin, y_bin, &path, NULL, NULL, NULL);
g_object_set_data_full(G_OBJECT(friendlist), "hovered_row", path, (GDestroyNotify)gtk_tree_path_free);
}
gboolean linphone_gtk_friend_list_enter_event_handler(GtkTreeView *friendlist, GdkEventCrossing *event) {
update_hovered_row_path(friendlist, event->x, event->y);
linphone_gtk_friend_list_update_button_display(friendlist);
return FALSE;
}
gboolean linphone_gtk_friend_list_leave_event_handler(GtkTreeView *friendlist, GdkEventCrossing *event) {
g_object_set_data(G_OBJECT(friendlist), "hovered_row", NULL);
linphone_gtk_friend_list_update_button_display(friendlist);
return FALSE;
}
gboolean linphone_gtk_friend_list_motion_event_handler(GtkTreeView *friendlist, GdkEventMotion *event) {
update_hovered_row_path(friendlist, event->x, event->y);
linphone_gtk_friend_list_update_button_display(friendlist);
return FALSE;
}

View file

@ -47,11 +47,10 @@
<object class="GtkHBox" id="encryption_box">
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="dialog_authenticator_image">
<object class="GtkImage" id="encryption_status_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon-size">1</property>
<property name="icon_name">linphone-security-pending</property>
</object>
<packing>
<property name="expand">False</property>
@ -59,18 +58,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="encryption_status_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="encryption_label">
<property name="visible">True</property>
@ -80,7 +67,7 @@
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -94,7 +81,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
</object>
@ -245,12 +232,11 @@
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="record_button">
<property name="label">gtk-media-record</property>
<property name="label" translatable="yes">Record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Record this call to an audio file</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>

View file

@ -63,15 +63,9 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
}
static GtkWidget *make_tab_header(int number){
GtkWidget *w=gtk_hbox_new (FALSE,0);
GtkWidget *i=gtk_image_new_from_icon_name("linphone-start-call", GTK_ICON_SIZE_BUTTON);
GtkWidget *l;
gchar *text=g_strdup_printf(_("Call #%i"),number);
l=gtk_label_new (text);
gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
gtk_box_pack_end(GTK_BOX(w),l,TRUE,TRUE,0);
gtk_widget_show_all(w);
return w;
gchar text[20];
g_snprintf(text, sizeof(text), _("Call #%i"), number);
return linphone_gtk_make_tab_header(text, "linphone-start-call", FALSE, NULL, NULL);
}
void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause){
@ -85,7 +79,7 @@ void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause){
gchar *text;
if(pause){
i=gtk_image_new_from_stock(GTK_STOCK_MEDIA_PAUSE,GTK_ICON_SIZE_BUTTON);
i=gtk_image_new_from_icon_name("linphone-hold-off",GTK_ICON_SIZE_BUTTON);
} else {
i=gtk_image_new_from_icon_name("linphone-start-call", GTK_ICON_SIZE_BUTTON);
}
@ -365,7 +359,7 @@ typedef enum { VOLUME_CTRL_PLAYBACK, VOLUME_CTRL_RECORD } VolumeControlType;
static void volume_control_value_changed(GtkScaleButton *button, gdouble value, gpointer user_data) {
LinphoneCall *call = (LinphoneCall *)g_object_get_data(G_OBJECT(button), "call");
VolumeControlType type = (VolumeControlType)g_object_get_data(G_OBJECT(button), "type");
VolumeControlType type = (VolumeControlType)GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "type"));
if(type == VOLUME_CTRL_PLAYBACK) {
linphone_call_set_speaker_volume_gain(call, value);
@ -374,14 +368,21 @@ static void volume_control_value_changed(GtkScaleButton *button, gdouble value,
}
}
static void volume_control_button_update_value(GtkWidget *widget) {
static gboolean volume_control_button_update_value(GtkWidget *widget) {
LinphoneCall *call = (LinphoneCall *)g_object_get_data(G_OBJECT(widget), "call");
VolumeControlType type = (VolumeControlType)g_object_get_data(G_OBJECT(widget), "type");
VolumeControlType type = (VolumeControlType)GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "type"));
float gain = -1;
if(type == VOLUME_CTRL_PLAYBACK) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(widget), linphone_call_get_speaker_volume_gain(call));
gain = linphone_call_get_speaker_volume_gain(call);
} else if(type == VOLUME_CTRL_RECORD) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(widget), linphone_call_get_microphone_volume_gain(call));
gain = linphone_call_get_microphone_volume_gain(call);
}
if(gain >= 0.0f) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(widget), gain);
return TRUE;
} else {
return FALSE;
}
}
@ -392,19 +393,24 @@ static gboolean volume_control_button_enter_event_handler(GtkWidget *widget) {
static void volume_control_init(GtkWidget *vol_ctrl, VolumeControlType type, LinphoneCall *call) {
g_object_set_data(G_OBJECT(vol_ctrl), "call", call);
g_object_set_data(G_OBJECT(vol_ctrl), "type", (gpointer)type);
g_signal_connect(G_OBJECT(vol_ctrl), "enter-notify-event", G_CALLBACK(volume_control_button_enter_event_handler), NULL);
g_signal_connect(G_OBJECT(vol_ctrl), "value-changed", G_CALLBACK(volume_control_value_changed), NULL);
g_object_set_data(G_OBJECT(vol_ctrl), "type", GINT_TO_POINTER(type));
if(!volume_control_button_update_value(vol_ctrl)) {
gtk_widget_set_sensitive(vol_ctrl, FALSE);
} else {
gtk_widget_set_sensitive(vol_ctrl, TRUE);
g_signal_connect(G_OBJECT(vol_ctrl), "enter-notify-event", G_CALLBACK(volume_control_button_enter_event_handler), NULL);
g_signal_connect(G_OBJECT(vol_ctrl), "value-changed", G_CALLBACK(volume_control_value_changed), NULL);
}
}
void linphone_gtk_create_in_call_view(LinphoneCall *call){
GtkWidget *call_view=linphone_gtk_create_widget("in_call_frame");
GtkWidget *main_window=linphone_gtk_get_main_window ();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
GtkWidget *spk_vol_ctrl = linphone_gtk_get_widget(call_view, "incall_spk_vol_ctrl_button");
GtkWidget *mic_vol_ctrl = linphone_gtk_get_widget(call_view, "incall_mic_vol_ctrl_button");
GtkWidget *audio_bar = linphone_gtk_get_widget(call_view, "incall_audioview");
static int call_index=1;
int idx;
GtkWidget *record;
GtkWidget *transfer;
GtkWidget *conf;
GtkWidget *button;
@ -429,14 +435,16 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(call_view,"incall_mute")),FALSE);
record = linphone_gtk_get_widget(call_view, "record_button");
gtk_button_set_image(GTK_BUTTON(record), gtk_image_new_from_icon_name("linphone-record", GTK_ICON_SIZE_BUTTON));
gtk_widget_hide(record);
transfer = linphone_gtk_get_widget(call_view,"transfer_button");
gtk_button_set_image(GTK_BUTTON(transfer),gtk_image_new_from_stock
(GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
gtk_button_set_image(GTK_BUTTON(transfer),gtk_image_new_from_icon_name("linphone-call-transfer",GTK_ICON_SIZE_BUTTON));
g_signal_connect(G_OBJECT(transfer),"clicked",(GCallback)transfer_button_clicked,call);
gtk_widget_hide(transfer);
conf = linphone_gtk_get_widget(call_view,"conference_button");
gtk_button_set_image(GTK_BUTTON(conf),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
gtk_button_set_image(GTK_BUTTON(conf),gtk_image_new_from_icon_name("linphone-conference-start",GTK_ICON_SIZE_BUTTON));
g_signal_connect(G_OBJECT(conf),"clicked",(GCallback)conference_button_clicked,call);
gtk_widget_hide(conf);
@ -450,8 +458,7 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
gtk_widget_show(image);
g_signal_connect_swapped(G_OBJECT(linphone_gtk_get_widget(call_view,"quality_indicator")),"button-press-event",(GCallback)linphone_gtk_show_call_stats,call);
volume_control_init(spk_vol_ctrl, VOLUME_CTRL_PLAYBACK, call);
volume_control_init(mic_vol_ctrl, VOLUME_CTRL_RECORD, call);
gtk_widget_hide(audio_bar);
}
static void video_button_clicked(GtkWidget *button, LinphoneCall *call){
@ -476,7 +483,7 @@ void linphone_gtk_update_video_button(LinphoneCall *call){
button=linphone_gtk_get_widget(call_view,"video_button");
gtk_button_set_image(GTK_BUTTON(button),
gtk_image_new_from_stock(has_video ? GTK_STOCK_REMOVE : GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
gtk_image_new_from_icon_name(has_video ? "linphone-camera-disabled" : "linphone-camera-enabled",GTK_ICON_SIZE_BUTTON));
g_object_set_data(G_OBJECT(button),"adding_video",GINT_TO_POINTER(!has_video));
if (!linphone_core_video_supported(linphone_call_get_core(call))){
gtk_widget_set_sensitive(button,FALSE);
@ -687,10 +694,14 @@ void linphone_gtk_in_call_view_enable_audio_view(LinphoneCall *call, gboolean va
GtkWidget *audio_view=linphone_gtk_get_widget(callview,"incall_audioview");
GtkWidget *mic_level=linphone_gtk_get_widget(callview,"mic_audiolevel");
GtkWidget *spk_level=linphone_gtk_get_widget(callview,"spk_audiolevel");
GtkWidget *mic_ctrl = linphone_gtk_get_widget(callview, "incall_mic_vol_ctrl_button");
GtkWidget *spk_ctrl = linphone_gtk_get_widget(callview, "incall_spk_vol_ctrl_button");
if (val){
linphone_gtk_init_audio_meter(mic_level,(get_volume_t)linphone_call_get_record_volume,call);
linphone_gtk_init_audio_meter(spk_level,(get_volume_t)linphone_call_get_play_volume,call);
volume_control_init(mic_ctrl, VOLUME_CTRL_RECORD, call);
volume_control_init(spk_ctrl, VOLUME_CTRL_PLAYBACK, call);
gtk_widget_show_all(audio_view);
}else{
linphone_gtk_uninit_audio_meter(mic_level);
@ -718,13 +729,13 @@ void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call){
case LinphoneMediaEncryptionSRTP:
gtk_widget_show_all(encryption_box);
gtk_label_set_markup(GTK_LABEL(label),_("Secured by SRTP"));
gtk_widget_hide(status_icon);
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
gtk_widget_hide(verify_button);
break;
case LinphoneMediaEncryptionDTLS:
gtk_widget_show_all(encryption_box);
gtk_label_set_markup(GTK_LABEL(label),_("Secured by DTLS"));
gtk_widget_hide(status_icon);
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
gtk_widget_hide(verify_button);
break;
case LinphoneMediaEncryptionZRTP:
@ -732,8 +743,8 @@ void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call){
gchar *text=g_strdup_printf(_("Secured by ZRTP - [auth token: %s]"),linphone_call_get_authentication_token(call));
gtk_label_set_markup(GTK_LABEL(label),text);
g_free(text);
gtk_image_set_from_stock(GTK_IMAGE(status_icon),
verified ? GTK_STOCK_APPLY : GTK_STOCK_DIALOG_WARNING,GTK_ICON_SIZE_MENU);
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon),
verified ? "linphone-security-ok" : "linphone-security-pending", GTK_ICON_SIZE_MENU);
gtk_button_set_label(GTK_BUTTON(verify_button),
verified ? _("Set unverified") : _("Set verified"));
gtk_widget_show_all(encryption_box);

View file

@ -4,6 +4,7 @@
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="keypad">
<property name="can_focus">False</property>
<signal name="delete-event" handler="linphone_gtk_keypad_destroyed_handler" swapped="no"/>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
@ -29,12 +30,11 @@
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="dtmf_D">
<property name="label" translatable="no">D</property>
<property name="label">D</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@ -45,12 +45,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_#">
<property name="label" translatable="no">#</property>
<property name="label">#</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@ -61,12 +60,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_0">
<property name="label" translatable="no">0</property>
<property name="label">0</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -77,12 +75,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_*">
<property name="label" translatable="no">*</property>
<property name="label">*</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="top_attach">3</property>
@ -91,12 +88,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_C">
<property name="label" translatable="no">C</property>
<property name="label">C</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@ -107,12 +103,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_9">
<property name="label" translatable="no">9</property>
<property name="label">9</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@ -123,12 +118,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_8">
<property name="label" translatable="no">8</property>
<property name="label">8</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -139,12 +133,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_7">
<property name="label" translatable="no">7</property>
<property name="label">7</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="top_attach">2</property>
@ -153,12 +146,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_B">
<property name="label" translatable="no">B</property>
<property name="label">B</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@ -169,12 +161,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_6">
<property name="label" translatable="no">6</property>
<property name="label">6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@ -185,12 +176,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_5">
<property name="label" translatable="no">5</property>
<property name="label">5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -201,12 +191,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_4">
<property name="label" translatable="no">4</property>
<property name="label">4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="top_attach">1</property>
@ -215,12 +204,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_A">
<property name="label" translatable="no">A</property>
<property name="label">A</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">3</property>
@ -229,12 +217,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_3">
<property name="label" translatable="no">3</property>
<property name="label">3</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">2</property>
@ -243,12 +230,11 @@
</child>
<child>
<object class="GtkButton" id="dtmf_2">
<property name="label" translatable="no">2</property>
<property name="label">2</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -257,14 +243,13 @@
</child>
<child>
<object class="GtkButton" id="dtmf_1">
<property name="label" translatable="no">1</property>
<property name="label">1</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
</object>
</child>
</object>

View file

@ -102,6 +102,7 @@ LINPHONE_PUBLIC void linphone_gtk_destroy_window(GtkWidget *window);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_window(const char *window_name, GtkWidget *parent);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char* widget_name);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_make_tab_header(const gchar *label, const gchar *icon_name, gboolean show_quit_button, GCallback cb, gpointer user_data);
char *linphone_gtk_message_storage_get_db_file(const char *filename);
char *linphone_gtk_call_logs_storage_get_db_file(const char *filename);
@ -154,12 +155,14 @@ LINPHONE_PUBLIC LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAd
LINPHONE_PUBLIC void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg);
LINPHONE_PUBLIC void linphone_gtk_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room);
LINPHONE_PUBLIC void linphone_gtk_friend_list_update_chat_picture();
LINPHONE_PUBLIC void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist);
LINPHONE_PUBLIC void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la);
LINPHONE_PUBLIC gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr);
LINPHONE_PUBLIC void linphone_gtk_friend_list_set_active_address(const LinphoneAddress *addr);
LINPHONE_PUBLIC const LinphoneAddress *linphone_gtk_friend_list_get_active_address(void);
// LINPHONE_PUBLIC void linphone_gtk_friend_list_on_presence_column_clicked(GtkTreeModel *model);
LINPHONE_PUBLIC gboolean linphone_gtk_friend_list_enter_event_handler(GtkTreeView *friendlist, GdkEventCrossing *event);
LINPHONE_PUBLIC gboolean linphone_gtk_friend_list_leave_event_handler(GtkTreeView *friendlist, GdkEventCrossing *event);
LINPHONE_PUBLIC gboolean linphone_gtk_friend_list_motion_event_handler(GtkTreeView *friendlist, GdkEventMotion *event);
LINPHONE_PUBLIC void linphone_gtk_friend_list_on_name_column_clicked(GtkTreeModel *model);
LINPHONE_PUBLIC void linphone_gtk_notebook_tab_select(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data);
LINPHONE_PUBLIC void linphone_gtk_show_friends(void);
@ -224,15 +227,14 @@ LINPHONE_PUBLIC void linphone_gtk_history_row_activated(GtkWidget *treeview);
LINPHONE_PUBLIC void linphone_gtk_history_row_selected(GtkWidget *treeview);
LINPHONE_PUBLIC void linphone_gtk_clear_call_logs(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_add_contact(void);
LINPHONE_PUBLIC void linphone_gtk_contact_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
LINPHONE_PUBLIC void linphone_gtk_contact_clicked(GtkTreeView *treeview);
LINPHONE_PUBLIC void linphone_gtk_contact_clicked(GtkTreeSelection *selection);
LINPHONE_PUBLIC void linphone_gtk_add_button_clicked(void);
LINPHONE_PUBLIC void linphone_gtk_edit_button_clicked(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_remove_button_clicked(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_my_presence_clicked(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_directory_search_button_clicked(GtkWidget *button);
LINPHONE_PUBLIC gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event);
LINPHONE_PUBLIC gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event);
gboolean linphone_gtk_contact_list_button_pressed(GtkWidget* firendlist, GdkEventButton* event);
LINPHONE_PUBLIC void linphone_gtk_auth_token_verified_clicked(GtkButton *button);
LINPHONE_PUBLIC void linphone_gtk_hold_clicked(GtkButton *button);
LINPHONE_PUBLIC void linphone_gtk_record_call_toggled(GtkWidget *button);
@ -255,7 +257,8 @@ LINPHONE_PUBLIC void linphone_gtk_used_identity_changed(GtkWidget *w);
LINPHONE_PUBLIC void on_proxy_refresh_button_clicked(GtkWidget *w);
LINPHONE_PUBLIC void linphone_gtk_link_to_website(GtkWidget *item);
LINPHONE_PUBLIC void linphone_gtk_options_activate(GtkWidget *item);
LINPHONE_PUBLIC void linphone_gtk_create_keypad(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_show_keypad_checked(GtkCheckMenuItem *check_menu_item);
LINPHONE_PUBLIC gboolean linphone_gtk_keypad_destroyed_handler(void);
LINPHONE_PUBLIC void linphone_gtk_keyword_changed(GtkEditable *e);
LINPHONE_PUBLIC void linphone_gtk_buddy_lookup_contact_activated(GtkWidget *treeview);

View file

@ -1400,7 +1400,7 @@ static void update_registration_status(LinphoneProxyConfig *cfg, LinphoneRegistr
GtkTreeModel *model=gtk_combo_box_get_model(box);
GtkTreeIter iter;
gboolean found=FALSE;
const char *stock_id=NULL;
const char *icon_name=NULL;
if (gtk_tree_model_get_iter_first(model,&iter)){
gpointer p;
@ -1418,21 +1418,21 @@ static void update_registration_status(LinphoneProxyConfig *cfg, LinphoneRegistr
}
switch (rs){
case LinphoneRegistrationOk:
stock_id=GTK_STOCK_YES;
icon_name="linphone-ok";
break;
case LinphoneRegistrationProgress:
stock_id=GTK_STOCK_REFRESH;
icon_name="linphone-inprogress";
break;
case LinphoneRegistrationCleared:
stock_id=NULL;
icon_name=NULL;
break;
case LinphoneRegistrationFailed:
stock_id=GTK_STOCK_DIALOG_WARNING;
icon_name="linphone-failed";
break;
default:
break;
}
gtk_list_store_set(GTK_LIST_STORE(model),&iter,1,stock_id,-1);
gtk_list_store_set(GTK_LIST_STORE(model),&iter,1,icon_name,-1);
}
static void linphone_gtk_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg,
@ -1588,7 +1588,7 @@ static void init_identity_combo(GtkComboBox *box){
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(box),(r1=gtk_cell_renderer_text_new()),TRUE);
gtk_cell_layout_pack_end(GTK_CELL_LAYOUT(box),(r2=gtk_cell_renderer_pixbuf_new()),FALSE);
gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(box),r1,"text",0);
gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(box),r2,"stock-id",1);
gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(box),r2,"icon-name",1);
g_object_set(G_OBJECT(r1),"ellipsize",PANGO_ELLIPSIZE_END,NULL);
gtk_combo_box_set_model(box,GTK_TREE_MODEL(store));
}
@ -1620,7 +1620,7 @@ void linphone_gtk_load_identities(void){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,0,linphone_proxy_config_get_identity(cfg),1,
linphone_proxy_config_is_registered(cfg) ? GTK_STOCK_YES : NULL,
linphone_proxy_config_is_registered(cfg) ? "linphone-ok" : NULL,
2,cfg,-1);
if (cfg==def) {
def_index=i;
@ -1811,7 +1811,7 @@ void linphone_gtk_keypad_key_released(GtkWidget *w, GdkEvent *event, gpointer us
}
}
void linphone_gtk_create_keypad(GtkWidget *button){
static void linphone_gtk_show_keypad(void){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *k=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"keypad");
GtkWidget *keypad;
@ -1821,7 +1821,7 @@ void linphone_gtk_create_keypad(GtkWidget *button){
keypad=linphone_gtk_create_window("keypad", NULL);
linphone_gtk_connect_digits(keypad);
linphone_gtk_init_dtmf_table(keypad);
g_object_set_data(G_OBJECT(mw),"keypad",(gpointer)keypad);
g_object_set_data(G_OBJECT(mw),"keypad", keypad);
if(!GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"show_abcd"))){
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_A"));
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_B"));
@ -1832,6 +1832,30 @@ void linphone_gtk_create_keypad(GtkWidget *button){
gtk_widget_show(keypad);
}
static void linphone_gtk_destroy_keypad(void) {
GtkWidget *mw = linphone_gtk_get_main_window();
GtkWidget *keypad = GTK_WIDGET(g_object_get_data(G_OBJECT(mw), "keypad"));
if(keypad) {
gtk_widget_destroy(keypad);
g_object_set_data(G_OBJECT(mw), "keypad", NULL);
}
}
void linphone_gtk_show_keypad_checked(GtkCheckMenuItem *check_menu_item) {
if(gtk_check_menu_item_get_active(check_menu_item)) {
linphone_gtk_show_keypad();
} else {
linphone_gtk_destroy_keypad();
}
}
gboolean linphone_gtk_keypad_destroyed_handler(void) {
GtkWidget *mw = linphone_gtk_get_main_window();
GtkWidget *show_keypad_item = linphone_gtk_get_widget(mw, "show_keypad_menu_item");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_keypad_item), FALSE);
return FALSE;
}
static void linphone_gtk_init_main_window(){
GtkWidget *main_window;
linphone_gtk_configure_main_window();
@ -2017,7 +2041,7 @@ static void populate_xdg_data_dirs_envvar(void) {
paths = g_strsplit(value, ":", -1);
for(i=0; paths[i] && strcmp(paths[i], PACKAGE_DATA_DIR) != 0; i++);
if(paths[i] == NULL) {
gchar *new_value = g_strdup_printf("%s:%s", value, PACKAGE_DATA_DIR);
gchar *new_value = g_strdup_printf("%s:%s", PACKAGE_DATA_DIR, value);
g_setenv("XDG_DATA_DIRS", new_value, TRUE);
g_free(new_value);
}
@ -2207,3 +2231,25 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
return main(__argc, __argv);
}
#endif
GtkWidget *linphone_gtk_make_tab_header(const gchar *label, const gchar *icon_name, gboolean show_quit_button, GCallback cb, gpointer user_data) {
GtkWidget *tab_header=gtk_hbox_new (FALSE,0);
GtkWidget *label_widget = gtk_label_new (label);
if(icon_name) {
GtkWidget *icon=gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX(tab_header),icon,FALSE,FALSE,4);
}
gtk_box_pack_start (GTK_BOX(tab_header),label_widget,FALSE,FALSE,0);
if(show_quit_button) {
GtkWidget *button = gtk_button_new();
GtkWidget *button_image=gtk_image_new_from_stock(GTK_STOCK_CLOSE,GTK_ICON_SIZE_MENU);
gtk_button_set_image(GTK_BUTTON(button),button_image);
gtk_button_set_relief(GTK_BUTTON(button),GTK_RELIEF_NONE);
g_signal_connect_swapped(G_OBJECT(button),"clicked",cb,user_data);
gtk_box_pack_end(GTK_BOX(tab_header),button,FALSE,FALSE,4);
g_object_set_data(G_OBJECT(tab_header), "button", button);
}
g_object_set_data(G_OBJECT(tab_header), "label", label_widget);
return tab_header;
}

View file

@ -6,18 +6,14 @@
<object class="GtkImage" id="add_call_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">32</property>
<property name="xpad">2</property>
<property name="pixel_size">30</property>
<property name="icon_name">linphone-add-call</property>
</object>
<object class="GtkImage" id="add_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-add</property>
</object>
<object class="GtkImage" id="add_image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-add</property>
<property name="icon_name">linphone-contact-add</property>
</object>
<object class="GtkImage" id="connect_image">
<property name="visible">True</property>
@ -38,6 +34,10 @@
<column type="gchararray"/>
<!-- column-name chat_icon -->
<column type="gchararray"/>
<!-- column-name call_button_visible -->
<column type="gboolean"/>
<!-- column-name chat_button_visible -->
<column type="gboolean"/>
</columns>
<data>
<row>
@ -45,36 +45,31 @@
<col id="1">Toto</col>
<col id="4">toto@sip.linphone.org</col>
<col id="5">linphone-chat-nothing</col>
<col id="6">False</col>
<col id="7">False</col>
</row>
<row>
<col id="0">linphone-status-offline</col>
<col id="1">Toto2</col>
<col id="4">toto2@sip.linphone.org</col>
<col id="5">linphone-chat-nothing</col>
<col id="6">False</col>
<col id="7">False</col>
</row>
<row>
<col id="0">linphone-status-offline</col>
<col id="1">Toto3</col>
<col id="4">toto3@sip.linphone.org</col>
<col id="5">linphone-chat-nothing</col>
<col id="6">False</col>
<col id="7">False</col>
</row>
</data>
</object>
<object class="GtkImage" id="dialer_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">32</property>
<property name="icon_name">linphone-show-dialer</property>
</object>
<object class="GtkImage" id="edit_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
</object>
<object class="GtkImage" id="edit_image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
<property name="icon_name">linphone-edit</property>
</object>
<object class="GtkImage" id="execute_image">
<property name="visible">True</property>
@ -108,28 +103,24 @@
<property name="yalign">0.49000000953674316</property>
<property name="stock">gtk-properties</property>
</object>
<object class="GtkImage" id="remove_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Delete</property>
<property name="stock">gtk-remove</property>
</object>
<object class="GtkImage" id="remove_image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Delete</property>
<property name="stock">gtk-remove</property>
<property name="icon_name">linphone-delete</property>
</object>
<object class="GtkImage" id="start_call_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">32</property>
<property name="xpad">2</property>
<property name="pixel_size">30</property>
<property name="icon_name">linphone-start-call</property>
</object>
<object class="GtkImage" id="start_chat_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">32</property>
<property name="xpad">2</property>
<property name="pixel_size">30</property>
<property name="icon_name">linphone-start-chat</property>
</object>
<object class="GtkWindow" id="main">
@ -212,6 +203,15 @@
<signal name="toggled" handler="linphone_gtk_enable_self_view" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="show_keypad_menu_item">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Show keypad</property>
<property name="use_underline">True</property>
<signal name="toggled" handler="linphone_gtk_show_keypad_checked" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separatormenuitem2">
<property name="visible">True</property>
@ -346,11 +346,11 @@
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="secondary_icon_name">linphone-contact-not-bookmarked</property>
<property name="secondary_icon_name">linphone-contact-add</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">True</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">False</property>
<signal name="activate" handler="linphone_gtk_uri_bar_activate" swapped="no"/>
</object>
<packing>
@ -380,20 +380,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="keypad">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">dialer_image</property>
<signal name="clicked" handler="linphone_gtk_create_keypad" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="add_call">
<property name="can_focus">True</property>
@ -405,8 +391,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">6</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -420,7 +405,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
<child>
@ -435,7 +420,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">4</property>
<property name="position">3</property>
</packing>
</child>
</object>
@ -490,8 +475,9 @@
<property name="search_column">1</property>
<property name="tooltip_column">4</property>
<signal name="button-press-event" handler="linphone_gtk_contact_list_button_pressed" swapped="no"/>
<signal name="cursor-changed" handler="linphone_gtk_contact_clicked" swapped="no"/>
<signal name="row-activated" handler="linphone_gtk_contact_activated" swapped="no"/>
<signal name="leave-notify-event" handler="linphone_gtk_friend_list_leave_event_handler" swapped="no"/>
<signal name="enter-notify-event" handler="linphone_gtk_friend_list_enter_event_handler" swapped="no"/>
<signal name="motion-notify-event" handler="linphone_gtk_friend_list_motion_event_handler" swapped="no"/>
<signal name="popup-menu" handler="linphone_gtk_popup_contact_menu" swapped="no"/>
<child>
<object class="GtkTreeViewColumn" id="presence_status_column">
@ -524,6 +510,9 @@
<property name="icon_name">linphone-start-call2</property>
<property name="stock_size">3</property>
</object>
<attributes>
<attribute name="visible">6</attribute>
</attributes>
</child>
</object>
</child>
@ -534,6 +523,7 @@
<property name="stock_size">3</property>
</object>
<attributes>
<attribute name="visible">7</attribute>
<attribute name="icon-name">5</attribute>
</attributes>
</child>
@ -553,14 +543,16 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property>
<child>
<object class="GtkButton" id="add_button">
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="resize_mode">immediate</property>
<property name="image">add_image1</property>
<property name="xalign">1</property>
<signal name="clicked" handler="linphone_gtk_add_button_clicked" swapped="no"/>
</object>
<packing>
@ -571,6 +563,8 @@
</child>
<child>
<object class="GtkButton" id="edit_button">
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@ -585,6 +579,8 @@
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@ -601,6 +597,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">4</property>
<property name="position">2</property>
</packing>
</child>
@ -640,6 +637,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="show_expanders">False</property>
<signal name="cursor-changed" handler="linphone_gtk_history_row_selected" swapped="no"/>
<signal name="row-activated" handler="linphone_gtk_history_row_activated" swapped="no"/>
</object>
@ -822,12 +820,13 @@
<object class="GtkImage" id="history_tab_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-refresh</property>
<property name="icon_name">linphone-history</property>
<property name="icon-size">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">4</property>
<property name="position">0</property>
</packing>
</child>

View file

@ -660,6 +660,7 @@ const char *sal_op_get_remote_ua(const SalOp *op);
void *sal_op_get_user_pointer(const SalOp *op);
const char* sal_op_get_call_id(const SalOp *op);
char* sal_op_get_dialog_id(const SalOp *op);
bool_t sal_op_is_forked_of(const SalOp *op1, const SalOp *op2);
const SalAddress* sal_op_get_service_route(const SalOp *op);
void sal_op_set_service_route(SalOp *op,const SalAddress* service_route);

View file

@ -129,6 +129,17 @@ public interface LinphoneCallParams {
**/
String getCustomSdpMediaAttribute(StreamType type, String name);
/**
* Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
**/
void clearCustomSdpAttributes();
/**
* Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
* @param type The type of the stream to clear custom SDP attributes from.
**/
void clearCustomSdpMediaAttributes(StreamType type);
/**
* Set the privacy for the call.
* @param privacy_mask a or'd int of values defined in interface {@link org.linphone.core.Privacy}

View file

@ -32,6 +32,10 @@ public interface LinphoneCallStats {
* Video
*/
static public MediaType Video = new MediaType(1, "Video");
/**
* Text
*/
static public MediaType Text = new MediaType(2, "Text");
protected final int mValue;
private final String mStringValue;

View file

@ -133,6 +133,18 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
return getCustomSdpMediaAttribute(nativePtr, type.mValue, name);
}
private native void clearCustomSdpAttributes(long nativePtr);
@Override
public void clearCustomSdpAttributes() {
clearCustomSdpAttributes(nativePtr);
}
private native void clearCustomSdpMediaAttributes(long nativePtr, int type);
@Override
public void clearCustomSdpMediaAttributes(StreamType type) {
clearCustomSdpMediaAttributes(nativePtr, type.mValue);
}
private native void setPrivacy(long nativePtr, int mask);
@Override
public void setPrivacy(int privacy_mask) {

@ -1 +1 @@
Subproject commit 5abe09cc2a235116f2fbd2b22a30a96c059681d5
Subproject commit af9a3f7f992fa4fbb7f889c96607b48cccf1a8e4

2
oRTP

@ -1 +1 @@
Subproject commit 75610fea145c6411f66ad11c474ed19922032fab
Subproject commit 02473c786be89b3e41f9857d984e9b1918f19a68

View file

@ -36,12 +36,38 @@ install(FILES
svg/linphone-status-away.svg
svg/linphone-status-donotdisturb.svg
svg/linphone-status-offline.svg
svg/linphone-call-status-incoming.svg
svg/linphone-call-status-missed.svg
svg/linphone-call-status-outgoing.svg
svg/linphone-chat-new-message-and-writing.svg
svg/linphone-chat-new-message.svg
svg/linphone-chat-nothing.svg
svg/linphone-chat-writing.svg
svg/linphone-ok.svg
svg/linphone-inprogress.svg
svg/linphone-failed.svg
svg/linphone-camera-enabled.svg
svg/linphone-camera-disabled.svg
svg/linphone-security-ok.svg
svg/linphone-security-pending.svg
DESTINATION ${ICONS_INSTALL_DIR}/scalable/status
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES
svg/linphone-start-call.svg
svg/linphone-add-call.svg
svg/linphone-hold-off.svg
svg/linphone-hold-on.svg
svg/linphone-start-call2.svg
svg/linphone-start-chat.svg
svg/linphone-history.svg
svg/linphone-edit.svg
svg/linphone-delete.svg
svg/linphone-contact-add.svg
svg/linphone-conference-start.svg
svg/linphone-call-transfer.svg
svg/linphone-record.svg
DESTINATION ${ICONS_INSTALL_DIR}/scalable/actions
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
@ -61,21 +87,33 @@ install(FILES
linphone-chat-new-message-and-writing.png
linphone-call-status-incoming.png
linphone-call-status-outgoing.png
linphone-contact-bookmarked.png
linphone-contact-not-bookmarked.png
linphone-call-status-missed.png
linphone-ok.png
linphone-inprogress.png
linphone-failed.png
linphone-camera-enabled.png
linphone-camera-disabled.png
linphone-security-ok.png
linphone-security-pending.png
DESTINATION ${ICONS_INSTALL_DIR}/48x48/status
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES
linphone-start-call2.png
linphone-show-dialer.png
linphone-add-call.png
linphone-start-call.png
linphone-start-chat.png
linphone-stop-call.png
linphone-hold-on.png
linphone-hold-off.png
linphone-history.png
linphone-edit.png
linphone-delete.png
linphone-contact-add.png
linphone-conference-start.png
linphone-call-transfer.png
linphone-record.png
DESTINATION ${ICONS_INSTALL_DIR}/48x48/actions
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)

View file

@ -27,8 +27,14 @@ dist_status48icons_DATA= \
linphone-chat-new-message-and-writing.png \
linphone-call-status-incoming.png \
linphone-call-status-outgoing.png \
linphone-contact-bookmarked.png \
linphone-contact-not-bookmarked.png
linphone-call-status-missed.png \
linphone-ok.png \
linphone-inprogress.png \
linphone-failed.png \
linphone-camera-enabled.png \
linphone-camera-disabled.png \
linphone-security-ok.png \
linphone-security-pending.png
statussvgiconsdir=$(iconsdir)/scalable/status
dist_statussvgicons_DATA= \
@ -39,16 +45,51 @@ dist_statussvgicons_DATA= \
svg/linphone-status-online.svg \
svg/linphone-status-away.svg \
svg/linphone-status-donotdisturb.svg \
svg/linphone-status-offline.svg
svg/linphone-status-offline.svg \
svg/linphone-call-status-incoming.svg \
svg/linphone-call-status-missed.svg \
svg/linphone-call-status-outgoing.svg \
svg/linphone-chat-new-message-and-writing.svg \
svg/linphone-chat-new-message.svg \
svg/linphone-chat-nothing.svg \
svg/linphone-chat-writing.svg \
svg/linphone-ok.svg \
svg/linphone-inprogress.svg \
svg/linphone-failed.svg \
svg/linphone-camera-enabled.svg \
svg/linphone-camera-disabled.svg \
svg/linphone-security-ok.svg \
svg/linphone-security-pending.svg
actions48iconsdir=$(iconsdir)/48x48/actions
dist_actions48icons_DATA= \
linphone-start-call2.png \
linphone-show-dialer.png \
linphone-add-call.png \
linphone-start-call.png \
linphone-start-chat.png \
linphone-stop-call.png \
linphone-hold-on.png \
linphone-hold-off.png
linphone-hold-off.png \
linphone-history.png \
linphone-edit.png \
linphone-delete.png \
linphone-contact-add.png \
linphone-conference-start.png \
linphone-call-transfer.png \
linphone-record.png
actionssvgiconsdir=$(iconsdir)/scalable/actions
dist_actionssvgicons_DATA= \
svg/linphone-start-call.svg \
svg/linphone-add-call.svg \
svg/linphone-hold-off.svg \
svg/linphone-hold-on.svg \
svg/linphone-start-call2.svg \
svg/linphone-start-chat.svg \
svg/linphone-history.svg \
svg/linphone-edit.svg \
svg/linphone-delete.svg \
svg/linphone-contact-add.svg \
svg/linphone-conference-start.svg \
svg/linphone-call-transfer.svg \
svg/linphone-record.svg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
pixmaps/linphone-delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pixmaps/linphone-edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
pixmaps/linphone-failed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
pixmaps/linphone-ok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
pixmaps/linphone-record.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="378.2998" y1="390.9453" x2="378.2998" y2="450.9448">
<stop offset="0.0184" style="stop-color:#CFCFD1"/>
<stop offset="0.4294" style="stop-color:#FFFFFF"/>
<stop offset="0.6171" style="stop-color:#FBFBFC"/>
<stop offset="0.7928" style="stop-color:#F0F0F1"/>
<stop offset="0.9634" style="stop-color:#DDDEE0"/>
<stop offset="1" style="stop-color:#D8D9DB"/>
</linearGradient>
<path fill="url(#SVGID_1_)" stroke="#636566" stroke-width="0.25" d="M456.8,440.944c0,5.521-4.393,10-9.812,10H309.612
c-5.42,0-9.812-4.479-9.812-10v-39.999c0-5.523,4.393-10,9.812-10h137.375c5.42,0,9.812,4.477,9.812,10V440.944z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<path fill="#969696" d="M395.103,419.955c0-2.225-13.979-6.076-14.99-6.887c-1.013-0.809-3.041-3.442-3.041-4.05
c0-0.609,2.436-6.077,2.436-7.291c0-1.214,0.605-1.825,0.605-7.696c0-5.875-5.669-9.115-9.111-9.116l0,0h-0.003l0,0
c-3.441,0.001-9.112,3.242-9.112,9.116c0,5.872,0.607,6.481,0.607,7.696c0,1.215,2.433,6.683,2.433,7.291
c0,0.606-2.027,3.241-3.04,4.05c-1.014,0.812-14.989,4.662-14.989,6.887c0,2.229-0.404,7.091-0.404,7.091h49.02
C395.511,427.045,395.103,422.183,395.103,419.955z"/>
<path fill="#FFFFFF" d="M394.122,417.014c0-2.226-13.979-6.076-14.99-6.887c-1.013-0.809-3.041-3.442-3.041-4.05
c0-0.609,2.436-6.077,2.436-7.292c0-1.214,0.605-1.825,0.605-7.696c0-5.875-5.668-9.115-9.111-9.117l0,0h-0.003l0,0
c-3.441,0.001-9.112,3.242-9.112,9.117c0,5.871,0.607,6.481,0.607,7.696c0,1.216,2.433,6.684,2.433,7.292
c0,0.606-2.027,3.241-3.04,4.05c-1.014,0.812-14.989,4.662-14.989,6.887c0,2.228-0.404,7.09-0.404,7.09h49.02
C394.531,424.104,394.122,419.242,394.122,417.014z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<g>
<path fill="#969696" d="M286.498,434.42c4.559,3.653,9.804,6.589,14.792,7.49c9.402,1.716,13.399,0.105,16.132-7.211
c0,0,1.682-3.361-5.614-6.452c-1.62-0.686-6.091-1.651-7.458-0.151c-1.361,1.503-1.277,3.678-1.616,4.564
c-0.337,0.882-3.245,0.99-4.293,0.643c-1.357-0.451-4.558-2.122-7.51-4.416l-0.13-0.102c-2.877-2.393-5.192-5.152-5.925-6.384
c-0.565-0.948-1.092-3.814-0.303-4.332c0.793-0.521,2.939-0.906,4.112-2.56c1.178-1.657-0.738-5.82-1.753-7.251
c-4.588-6.462-7.51-4.09-7.51-4.09c-6.554,4.239-7.27,8.487-3.574,17.304c1.961,4.678,5.95,9.17,10.502,12.829L286.498,434.42z"/>
<g>
<path fill="#969696" d="M320.779,413.026c-0.12,1.753,0.417,2.49,1.237,1.128c0.691-1.223,0.919-3.176,0.103-5.597
c-1.512-5.152-8.312-10.048-14.974-9.817c-3.53,0.197-2.936,0.61,0.522,0.972c6.191,0.844,11.23,5.292,12.592,9.775
C320.682,410.765,320.826,411.971,320.779,413.026z"/>
<path fill="#969696" d="M314.836,412.663c0.271,1.751,0.419,3.086,1.102,3.218c0.657,0.119,1.937-0.814,2.1-2.613
c0.096-1.174-0.081-2.533-0.672-3.977c-1.681-4.528-7.676-8.517-14.134-8.04c-3.33,0.159-6.052,1.718-6.255,2.069
c-0.245,0.373,2.155-0.401,5.133-0.345c3.972,0.021,7.9,1.818,10.237,4.55C313.846,409.232,314.602,411.068,314.836,412.663z"/>
<path fill="#969696" d="M300.954,405.212c-2.627-0.119-5,1.161-4.875,1.609c0.098,0.449,1.605,0.432,3.1,0.466
c0.889,0.008,1.748,0.121,2.565,0.328c2.638,0.676,4.356,2.175,5.243,3.652c0.848,1.323,1.616,2.738,2.504,3.001
c0.868,0.265,1.9-0.68,1.501-2.231c-0.463-1.619-1.626-3.437-3.732-4.851C305.516,406.021,303.299,405.291,300.954,405.212z"/>
</g>
</g>
<g>
<path fill="#FFFFFF" d="M285.517,431.291c4.559,3.652,9.805,6.588,14.792,7.49c9.402,1.715,13.399,0.104,16.132-7.21
c0,0,1.682-3.361-5.614-6.454c-1.62-0.686-6.091-1.65-7.458-0.15c-1.361,1.502-1.277,3.678-1.616,4.564
c-0.337,0.882-3.245,0.99-4.292,0.643c-1.357-0.451-4.558-2.122-7.511-4.417l-0.13-0.102c-2.877-2.392-5.193-5.151-5.925-6.384
c-0.565-0.948-1.091-3.812-0.303-4.33c0.793-0.521,2.939-0.906,4.112-2.56c1.177-1.658-0.738-5.82-1.753-7.251
c-4.589-6.462-7.511-4.09-7.511-4.09c-6.554,4.239-7.27,8.487-3.574,17.303c1.96,4.678,5.95,9.17,10.502,12.83L285.517,431.291z"/>
<g>
<path fill="#FFFFFF" d="M319.798,409.896c-0.12,1.753,0.417,2.49,1.238,1.129c0.69-1.224,0.918-3.177,0.102-5.597
c-1.512-5.153-8.312-10.049-14.974-9.817c-3.53,0.197-2.936,0.61,0.522,0.972c6.191,0.843,11.23,5.291,12.593,9.774
C319.701,407.636,319.846,408.841,319.798,409.896z"/>
<path fill="#FFFFFF" d="M313.856,409.533c0.271,1.751,0.419,3.086,1.102,3.219c0.657,0.119,1.937-0.815,2.1-2.615
c0.096-1.173-0.081-2.532-0.672-3.976c-1.681-4.528-7.675-8.517-14.134-8.04c-3.33,0.158-6.051,1.717-6.255,2.068
c-0.245,0.372,2.155-0.401,5.133-0.345c3.972,0.02,7.9,1.817,10.237,4.549C312.865,406.103,313.621,407.938,313.856,409.533z"/>
<path fill="#FFFFFF" d="M299.974,402.083c-2.627-0.119-5,1.16-4.875,1.609c0.098,0.449,1.605,0.431,3.1,0.467
c0.889,0.006,1.748,0.121,2.565,0.326c2.638,0.677,4.356,2.176,5.243,3.653c0.849,1.323,1.616,2.738,2.505,3.001
c0.867,0.266,1.9-0.679,1.5-2.23c-0.463-1.619-1.626-3.436-3.732-4.851C304.535,402.891,302.319,402.161,299.974,402.083z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<g>
<g>
<path fill="#969696" d="M80.256,431.196c-11.801,0-21.397-9.601-21.397-21.399c0-3.965,1.095-7.839,3.169-11.209
c1.337-2.169,3.03-4.066,5.033-5.642l2.175,2.766c-1.676,1.318-3.094,2.907-4.213,4.721c-1.73,2.812-2.646,6.052-2.646,9.364
c0,9.861,8.022,17.884,17.881,17.884c9.865,0,17.887-8.021,17.887-17.884c0-9.862-8.025-17.884-17.888-17.884v-3.518
c11.803,0,21.405,9.6,21.405,21.401C101.662,421.595,92.059,431.196,80.256,431.196L80.256,431.196z"/>
</g>
<g>
<polygon fill="#969696" points="66.492,403.217 67.496,394.839 59.115,393.838 63.095,390.709 71.473,391.712 70.47,400.087 "/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M79.06,428.085c-11.801,0-21.397-9.6-21.397-21.399c0-3.965,1.095-7.84,3.169-11.209
c1.337-2.169,3.03-4.067,5.033-5.642l2.175,2.766c-1.676,1.318-3.094,2.907-4.213,4.721c-1.73,2.812-2.646,6.052-2.646,9.364
c0,9.861,8.022,17.884,17.881,17.884c9.865,0,17.887-8.021,17.887-17.884s-8.025-17.884-17.888-17.884v-3.518
c11.803,0,21.405,9.6,21.405,21.401S90.863,428.085,79.06,428.085L79.06,428.085z"/>
</g>
<g>
<polygon fill="#FFFFFF" points="65.296,400.106 66.3,391.729 57.919,390.728 61.899,387.598 70.277,388.601 69.274,396.977 "/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="89"
height="89"
viewBox="0 0 89 89"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-add-call.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/linphone-add-call.png"
inkscape:export-xdpi="48.540001"
inkscape:export-ydpi="48.540001">
<metadata
id="metadata20">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>options_add_call + Rectangle 250 Copy 19</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1133"
id="namedview18"
showgrid="false"
inkscape:zoom="2.6516854"
inkscape:cx="-129.59746"
inkscape:cy="44.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">options_add_call + Rectangle 250 Copy 19</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
sketch:type="MSShapeGroup"
transform="translate(3.014283,2.268892)"
id="options_add_call">
<path
inkscape:connector-curvature="0"
id="Stroke-1"
d="M 2.2654515,29.559846 C -2.1317829,42.299035 4.0305678,60.502124 14.005238,70.710039 l 0.207416,0.214478 C 24.18525,81.132432 41.96916,87.441506 54.405866,82.939575 L 63.839179,70.276834 50.991787,57.123552 39.235407,67.301738 28.491222,56.303861 28.283805,56.091506 17.543767,45.093629 27.483176,33.053089 14.635785,19.90193 2.2654515,29.559846 l 0,0 z"
style="stroke:#444444;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Stroke-3"
d="m 77.004581,32.862025 c 7.354958,-7.357095 7.354958,-19.276132 0,-26.6290552 -7.352873,-7.3529232 -19.271827,-7.3550092 -26.626785,0 -7.352873,7.3508372 -7.352873,19.2740462 0,26.6290552 7.354958,7.352923 19.273912,7.348751 26.626785,0 z"
style="stroke:#444444;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Stroke-4"
d="m 63.694387,28.465243 0,-17.837838 m 8.916502,8.921335 -17.837838,-0.0032"
style="stroke:#444444;stroke-opacity:1" />
</g>
<rect
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1"
height="109.14064"
width="109.14064"
y="-9.6230001"
x="-9.8685999"
sketch:type="MSShapeGroup"
id="Rectangle-250-Copy-19" />
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="85px"
height="85px"
viewBox="0 0 85 85"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-call-status-incoming.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/linphone-call-status-incoming.png"
inkscape:export-xdpi="50.82"
inkscape:export-ydpi="50.82">
<metadata
id="metadata21">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1133"
id="namedview19"
showgrid="false"
inkscape:zoom="2.7764706"
inkscape:cx="-40.158898"
inkscape:cy="42.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">call_status_incoming</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="g4165">
<path
d="m 51.149956,4.222906 0,27.705641 0.0024,1.931282 -0.0024,-29.636923 z m 29.617778,29.646496 -29.615385,-0.0096 29.615385,0.0096 z M 52.672007,32.337778 82.012178,3 52.672007,32.337778 Z"
id="Imported-Layers"
inkscape:connector-curvature="0"
style="fill:none;fill-rule:evenodd;stroke:#96c11f;stroke-width:5;stroke-linecap:round;stroke-linejoin:round" />
<path
d="m 4.6651697,19.998632 c -5.0782906,14.354188 2.034188,34.87077 13.5429063,46.374701 l 0.239316,0.24171 C 29.953717,78.121368 50.470298,85.22906 64.8197,80.155556 L 75.706195,65.885128 60.882947,51.06188 47.31611,62.532308 22.290811,37.504615 33.756452,23.935385 18.933204,9.1145299 4.6651697,19.998632 l 0,0 z"
id="Path"
inkscape:connector-curvature="0"
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
</g>
<rect
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1"
height="110"
width="110"
y="-13"
x="-12"
sketch:type="MSShapeGroup"
id="Rectangle-232-Copy-19" />
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="84"
height="84"
viewBox="0 0 84 84"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-call-status-missed.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/linphone-call-status-missed.png"
inkscape:export-xdpi="51.43"
inkscape:export-ydpi="51.43">
<metadata
id="metadata21">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_status_missed</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1133"
id="namedview19"
showgrid="false"
inkscape:zoom="2.9135802"
inkscape:cx="-82.760594"
inkscape:cy="40.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">call_status_missed</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="g4163">
<path
style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round"
inkscape:connector-curvature="0"
id="Imported-Layers"
d="M 80.490124,5.229215 51.149953,34.566992 80.490124,5.229215 Z" />
<path
style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round"
inkscape:connector-curvature="0"
id="Imported-Layers-Copy"
d="M 80.48893,34.568189 51.151153,5.228018 80.48893,34.568189 Z" />
<path
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
inkscape:connector-curvature="0"
id="Path"
d="m 4.6651697,18.312632 c -5.0782906,14.354188 2.034188,34.87077 13.5429063,46.374701 l 0.239316,0.24171 C 29.953717,76.435368 50.470298,83.54306 64.8197,78.469556 L 75.706195,64.199128 60.882947,49.37588 47.31611,60.846308 22.290811,35.818615 33.756452,22.249385 18.933204,7.4285299 4.6651697,18.312632 l 0,0 z" />
</g>
<rect
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1"
height="110"
width="110"
y="-12.686"
x="-13"
sketch:type="MSShapeGroup"
id="Rectangle-232-Copy-50" />
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="85"
height="85"
viewBox="0 0 85 85"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-call-status-outgoing.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/linphone-call-status-outgoing.png"
inkscape:export-xdpi="50.82"
inkscape:export-ydpi="50.82">
<metadata
id="metadata20">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_status_outgoing</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1133"
id="namedview18"
showgrid="false"
inkscape:zoom="5.862558"
inkscape:cx="8.7248173"
inkscape:cy="36.080998"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">call_status_outgoing</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<path
d="m 82.012174,35.030086 0,-27.705641 -0.0024,-1.931282 0.0024,29.636923 z M 52.394396,5.38359 82.009781,5.39319 52.394396,5.38359 Z M 80.490123,6.915214 51.149952,36.252992 80.490123,6.915214 Z"
id="Imported-Layers"
inkscape:connector-curvature="0"
style="fill:none;fill-rule:evenodd;stroke:#3eb5c0;stroke-width:5;stroke-linecap:round;stroke-linejoin:round" />
<path
d="m 4.6651697,19.998632 c -5.0782906,14.354188 2.034188,34.87077 13.5429063,46.374701 l 0.239316,0.24171 C 29.953717,78.121368 50.470298,85.22906 64.8197,80.155556 L 75.706195,65.885128 60.882947,51.06188 47.31611,62.532308 22.290811,37.504615 33.756452,23.935385 18.933204,9.1145299 4.6651697,19.998632 l 0,0 z"
id="Path"
inkscape:connector-curvature="0"
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
<rect
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1"
height="110"
width="110"
y="-13"
x="-12"
sketch:type="MSShapeGroup"
id="Rectangle-232-Copy-49" />
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="118"
height="118"
viewBox="0 0 118 118"
version="1.1"
id="svg4359"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-call-transfer.svg"
inkscape:export-filename="/home/ghislain/code/linphone-desktop/submodules/linphone/pixmaps/linphone-call-transfer.png"
inkscape:export-xdpi="36.610001"
inkscape:export-ydpi="36.610001">
<metadata
id="metadata4383">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_transfer</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1141"
id="namedview4381"
showgrid="false"
inkscape:zoom="6.4168288"
inkscape:cx="59"
inkscape:cy="53.444902"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4359" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4361">call_transfer</title>
<desc
id="desc4363">Created with Sketch.</desc>
<defs
id="defs4365" />
<g
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
sketch:type="MSShapeGroup"
transform="translate(2,7)"
id="transfer_call-copy">
<g
id="Stroke-1-+-Stroke-3-+-Stroke-4-+-Stroke-4-Copy-2-+-Stroke-3-+-Stroke-4-Copy-2"
style="stroke:#444444;stroke-opacity:1">
<g
transform="translate(0.501758,13.339236)"
id="Stroke-1-+-Stroke-3-+-Stroke-4-+-Stroke-4-Copy-2"
style="stroke:#444444;stroke-opacity:1">
<g
id="Stroke-1-+-Stroke-3-+-Stroke-4"
transform="translate(0,0.839236)"
style="stroke:#444444;stroke-opacity:1">
<g
id="g4374"
style="stroke:#444444;stroke-opacity:1">
<path
inkscape:connector-curvature="0"
id="Stroke-1"
d="m 18.06252,69.243389 0.282315,0.291927 C 31.918529,83.429302 56.124197,92.016578 73.05179,85.889003 L 85.891466,68.653754 68.404889,50.750831 52.403288,64.604352 37.779384,49.635149 37.497069,49.346113 22.87881,34.37691 36.407334,17.988538 18.920757,0.08850498 2.0835046,13.233887 C -3.9015684,30.573189 4.4860032,55.349402 18.06252,69.243389 Z"
style="stroke:#444444;stroke-opacity:1" />
</g>
</g>
</g>
<g
transform="translate(61.360775,0.339236)"
id="Stroke-3-+-Stroke-4-Copy-2"
style="stroke:#444444;stroke-opacity:1">
<path
inkscape:connector-curvature="0"
id="Stroke-3"
d="m 43.810886,44.728481 c 10.010829,-10.013738 10.010829,-26.236731 0,-36.2447897 -10.00799,-10.0080592 -26.230871,-10.0108983 -36.2416999,0 -10.00799,10.0052197 -10.00799,26.2338917 0,36.2447897 10.0108289,10.008059 26.2337099,10.002381 36.2416999,0 z"
style="stroke:#444444;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Stroke-4-Copy"
d="M 26.171789,38.744024 37.830635,26.604489 M 26.181574,14.464954 37.830635,26.604489 m -1.196218,0 -23.082851,0"
style="stroke:#444444;stroke-opacity:1" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4 KiB

Some files were not shown because too many files have changed in this diff Show more