Commit 53627f92 authored by Ghislain MARY's avatar Ghislain MARY

No longer depend on gettext + remove core callbacks that were deprecated since a very long time.

parent be604611
......@@ -48,7 +48,6 @@ option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)
option(ENABLE_DOC "Enable documentation generation with Doxygen." YES)
option(ENABLE_JAVADOC "Add a target to generate documentation for Java API" NO)
option(ENABLE_LDAP "Enable LDAP support." NO)
option(ENABLE_NLS "Build with internationalisation support" YES)
option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO)
option(ENABLE_ROOTCA_DOWNLOAD "Download rootca.pem at build time." YES)
option(ENABLE_SOCI_STORAGE "Turn on compilation soci storage, for messages, contacts, history" YES)
......@@ -162,10 +161,6 @@ endif()
if(ENABLE_ASSISTANT)
set(BUILD_WIZARD 1)
endif()
if(ENABLE_NLS)
find_package(Gettext REQUIRED)
find_package(Intl REQUIRED)
endif()
if(ENABLE_LIME)
#bzrtp is only required for LIME
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
......
......@@ -46,7 +46,6 @@ Building liblinphone
* `ENABLE_VCARD=NO` : disable VCard support
* `ENABLE_SQLITE_STORAGE=NO` : disable SQlite user data storage (message, history, contacts list)
* `ENABLE_TOOLS=NO` : do not build tool binaries
* `ENABLE_NLS=NO` : disable internationalization
* `ENABLE_LIME=YES` : disable Linphone Instant Messaging Encryption
### Note for packagers
......
############################################################################
# FindIntl.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
#
# - Find the libintl include file and library
#
# INTL_FOUND - system has libintl
# INTL_INCLUDE_DIRS - the libintl include directory
# INTL_LIBRARIES - The libraries needed to use libintl
set(_INTL_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(INTL_INCLUDE_DIRS
NAMES libintl.h
HINTS _INTL_ROOT_PATHS
PATH_SUFFIXES include
)
if(INTL_INCLUDE_DIRS)
set(HAVE_LIBINTL_H 1)
endif()
set(INTL_ARGS INTL_INCLUDE_DIRS HAVE_LIBINTL_H)
if(NOT UNIX OR APPLE)
find_library(INTL_LIBRARIES
NAMES intl
HINTS ${_INTL_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
list(APPEND INTL_ARGS INTL_LIBRARIES)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Intl DEFAULT_MSG ${INTL_ARGS})
mark_as_advanced(${INTL_ARGS})
......@@ -39,12 +39,10 @@
#define PACKAGE_RING_DIR "${PACKAGE_RING_DIR}"
#cmakedefine BUILD_WIZARD
#cmakedefine HAVE_GTK_OSX 1
#cmakedefine HAVE_NOTIFY4
#cmakedefine HAVE_ZLIB 1
#cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1
#cmakedefine HAVE_LIBUDEV_H 0
#cmakedefine HAVE_LIME
#cmakedefine ENABLE_NLS 1
#cmakedefine ENABLE_UPDATE_CHECK 1
......@@ -111,9 +111,6 @@ static char **linephonec_readline_completion(const char *text,
/* These are callback for linphone core */
static void linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username, const char *domain);
static void linphonec_display_refer (LinphoneCore * lc, const char *refer_to);
static void linphonec_display_something (LinphoneCore * lc, const char *something);
static void linphonec_display_url (LinphoneCore * lc, const char *something, const char *url);
static void linphonec_display_warning (LinphoneCore * lc, const char *something);
static void linphonec_transfer_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState new_call_state);
static void linphonec_notify_presence_received(LinphoneCore *lc,LinphoneFriend *fid);
......@@ -122,7 +119,6 @@ static void linphonec_new_unknown_subscriber(LinphoneCore *lc,
static void linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
const LinphoneAddress *from, const char *msg);
static void linphonec_display_status (LinphoneCore * lc, const char *something);
static void linphonec_dtmf_received(LinphoneCore *lc, LinphoneCall *call, int dtmf);
static void print_prompt(LinphoneCore *opm);
void linphonec_out(const char *fmt,...);
......@@ -206,45 +202,6 @@ linphonec_display_refer (LinphoneCore * lc, const char *refer_to)
linphonec_out("Receiving out of call refer to %s\n", refer_to);
}
/*
* Linphone core callback
*/
static void
linphonec_display_something (LinphoneCore * lc, const char *something)
{
fprintf (stdout, "%s\n%s", something,prompt);
fflush(stdout);
}
/*
* Linphone core callback
*/
static void
linphonec_display_status (LinphoneCore * lc, const char *something)
{
fprintf (stdout, "%s\n%s", something,prompt);
fflush(stdout);
}
/*
* Linphone core callback
*/
static void
linphonec_display_warning (LinphoneCore * lc, const char *something)
{
fprintf (stdout, "Warning: %s\n%s", something,prompt);
fflush(stdout);
}
/*
* Linphone core callback
*/
static void
linphonec_display_url (LinphoneCore * lc, const char *something, const char *url)
{
fprintf (stdout, "%s : %s\n", something, url);
}
/*
* Linphone core callback
*/
......@@ -637,10 +594,6 @@ main (int argc, char *argv[]) {
linphonec_vtable.notify_presence_received = linphonec_notify_presence_received;
linphonec_vtable.new_subscription_requested = linphonec_new_unknown_subscriber;
linphonec_vtable.auth_info_requested = linphonec_prompt_for_auth;
linphonec_vtable.display_status = linphonec_display_status;
linphonec_vtable.display_message=linphonec_display_something;
linphonec_vtable.display_warning=linphonec_display_warning;
linphonec_vtable.display_url=linphonec_display_url;
linphonec_vtable.text_received=linphonec_text_received;
linphonec_vtable.dtmf_received=linphonec_dtmf_received;
linphonec_vtable.refer_received=linphonec_display_refer;
......
......@@ -230,25 +230,25 @@ char * linphone_call_log_to_str(const LinphoneCallLog *cl){
char *to=linphone_address_as_string (cl->to);
switch(cl->status){
case LinphoneCallAborted:
status=_("aborted");
status="aborted";
break;
case LinphoneCallSuccess:
status=_("completed");
status="completed";
break;
case LinphoneCallMissed:
status=_("missed");
status="missed";
break;
case LinphoneCallAcceptedElsewhere:
status=_("answered elsewhere");
status="answered elsewhere";
break;
case LinphoneCallDeclinedElsewhere:
status=_("declined elsewhere");
status="declined elsewhere";
break;
default:
status=_("unknown");
status="unknown";
}
tmp=ms_strdup_printf(_("%s at %s\nFrom: %s\nTo: %s\nStatus: %s\nDuration: %i mn %i sec\n"),
(cl->dir==LinphoneCallIncoming) ? _("Incoming call") : _("Outgoing call"),
tmp=ms_strdup_printf("%s at %s\nFrom: %s\nTo: %s\nStatus: %s\nDuration: %i mn %i sec\n",
(cl->dir==LinphoneCallIncoming) ? "Incoming call" : "Outgoing call",
cl->start_date,
from,
to,
......
......@@ -324,27 +324,16 @@ static void auth_failure(SalOp *op, SalAuthInfo* info) {
}
static void register_success(SalOp *op, bool_t registered){
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)sal_op_get_user_pointer(op);
char *msg;
if (!cfg){
ms_message("Registration success for deleted proxy config, ignored");
return;
}
linphone_proxy_config_set_state(cfg, registered ? LinphoneRegistrationOk : LinphoneRegistrationCleared ,
registered ? "Registration successful" : "Unregistration done");
{
if (registered) msg=ms_strdup_printf(_("Registration on %s successful."),sal_op_get_proxy(op));
else msg=ms_strdup_printf(_("Unregistration on %s done."),sal_op_get_proxy(op));
linphone_core_notify_display_status(lc,msg);
ms_free(msg);
}
}
static void register_failure(SalOp *op){
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)sal_op_get_user_pointer(op);
const SalErrorInfo *ei=sal_op_get_error_info(op);
const char *details=ei->full_string;
......@@ -354,17 +343,11 @@ static void register_failure(SalOp *op){
return ;
}
if (details==NULL)
details=_("no response timeout");
{
char *msg=ortp_strdup_printf(_("Registration on %s failed: %s"),sal_op_get_proxy(op), details);
linphone_core_notify_display_status(lc,msg);
ms_free(msg);
}
details="no response timeout";
if ((ei->reason == SalReasonServiceUnavailable || ei->reason == SalReasonIOError)
&& linphone_proxy_config_get_state(cfg) == LinphoneRegistrationOk) {
linphone_proxy_config_set_state(cfg,LinphoneRegistrationProgress,_("Service unavailable, retrying"));
linphone_proxy_config_set_state(cfg,LinphoneRegistrationProgress,"Service unavailable, retrying");
} else {
linphone_proxy_config_set_state(cfg,LinphoneRegistrationFailed,details);
}
......@@ -415,11 +398,6 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){
call->refer_to=ms_strdup(referto);
call->refer_pending=TRUE;
linphone_call_set_state(call,LinphoneCallRefered,"Refered");
{
char *msg=ms_strdup_printf(_("We are transferred to %s"),referto);
linphone_core_notify_display_status(lc,msg);
ms_free(msg);
}
if (call->refer_pending) linphone_core_start_refered_call(lc,call,NULL);
}else {
linphone_core_notify_refer_received(lc,referto);
......
......@@ -45,43 +45,43 @@ const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
const char *str=NULL;
switch(ss){
case LinphoneStatusOnline:
str=_("Online");
str="Online";
break;
case LinphoneStatusBusy:
str=_("Busy");
str="Busy";
break;
case LinphoneStatusBeRightBack:
str=_("Be right back");
str="Be right back";
break;
case LinphoneStatusAway:
str=_("Away");
str="Away";
break;
case LinphoneStatusOnThePhone:
str=_("On the phone");
str="On the phone";
break;
case LinphoneStatusOutToLunch:
str=_("Out to lunch");
str="Out to lunch";
break;
case LinphoneStatusDoNotDisturb:
str=_("Do not disturb");
str="Do not disturb";
break;
case LinphoneStatusMoved:
str=_("Moved");
str="Moved";
break;
case LinphoneStatusAltService:
str=_("Using another messaging service");
str="Using another messaging service";
break;
case LinphoneStatusOffline:
str=_("Offline");
str="Offline";
break;
case LinphoneStatusPending:
str=_("Pending");
str="Pending";
break;
case LinphoneStatusVacation:
str=_("Vacation");
str="Vacation";
break;
default:
str=_("Unknown status");
str="Unknown status";
}
return str;
}
......
......@@ -1997,8 +1997,6 @@ static void linphone_core_start(LinphoneCore * lc) {
}
#endif
linphone_core_notify_display_status(lc,_("Ready"));
lc->auto_net_state_mon=lc->sip_conf.auto_net_state_mon;
linphone_core_set_state(lc,LinphoneGlobalOn,"Ready");
}
......@@ -2753,13 +2751,6 @@ const char *linphone_core_get_user_agent_version(void){
return _ua_version;
}
static void transport_error(LinphoneCore *lc, const char* transport, int port){
char *msg=ortp_strdup_printf("Could not start %s transport on port %i, maybe this port is already used.",transport,port);
ms_warning("%s",msg);
linphone_core_notify_display_warning(lc,msg);
ms_free(msg);
}
static bool_t transports_unchanged(const LinphoneSipTransports * tr1, const LinphoneSipTransports * tr2){
return
tr2->udp_port==tr1->udp_port &&
......@@ -2800,26 +2791,17 @@ int _linphone_core_apply_transports(LinphoneCore *lc){
sal_set_http_proxy_port(sal,linphone_core_get_http_proxy_port(lc));
}
if (lc->tunnel && linphone_tunnel_sip_enabled(lc->tunnel) && linphone_tunnel_get_activated(lc->tunnel)){
if (sal_listen_port(sal,anyaddr,tr->udp_port,SalTransportUDP,TRUE)!=0){
transport_error(lc,"udp+tunnel",tr->udp_port);
}
sal_listen_port(sal,anyaddr,tr->udp_port,SalTransportUDP,TRUE);
}else{
if (tr->udp_port!=0){
if (sal_listen_port(sal,listening_address,tr->udp_port,SalTransportUDP,FALSE)!=0){
transport_error(lc,"udp",tr->udp_port);
}
sal_listen_port(sal,listening_address,tr->udp_port,SalTransportUDP,FALSE);
}
if (tr->tcp_port!=0){
if (sal_listen_port (sal,listening_address,tr->tcp_port,SalTransportTCP,FALSE)!=0){
transport_error(lc,"tcp",tr->tcp_port);
}
sal_listen_port (sal,listening_address,tr->tcp_port,SalTransportTCP,FALSE);
}
if (linphone_core_sip_transport_supported(lc,LinphoneTransportTls)){
if (tr->tls_port!=0){
if (sal_listen_port (sal,listening_address,tr->tls_port,SalTransportTLS,FALSE)!=0){
transport_error(lc,"tls",tr->tls_port);
}
}
if (tr->tls_port!=0)
sal_listen_port (sal,listening_address,tr->tls_port,SalTransportTLS,FALSE);
}
}
return 0;
......@@ -3147,7 +3129,6 @@ void linphone_core_iterate(LinphoneCore *lc){
belle_http_provider_set_tls_crypto_config(lc->http_provider, lc->http_crypto_config);
}
linphone_core_notify_display_status(lc, _("Configuring"));
linphone_core_set_state(lc, LinphoneGlobalConfiguring, "Configuring");
remote_provisioning_uri = linphone_core_get_provisioning_uri(lc);
......@@ -3514,7 +3495,6 @@ LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const
}
if(!linphone_core_can_we_add_call(lc)){
linphone_core_notify_display_warning(lc,_("Sorry, we have reached the maximum number of simultaneous calls"));
return NULL;
}
......
......@@ -262,9 +262,6 @@ public:
authMethodClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneCore$AuthMethod"));
authMethodFromIntId = env->GetStaticMethodID(authMethodClass,"fromInt","(I)Lorg/linphone/core/LinphoneCore$AuthMethod;");
/*displayStatus(LinphoneCore lc,String message);*/
displayStatusId = env->GetMethodID(listenerClass,"displayStatus","(Lorg/linphone/core/LinphoneCore;Ljava/lang/String;)V");
/*void generalState(LinphoneCore lc,int state); */
globalStateClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneCore$GlobalState"));
globalStateFromIntId = env->GetStaticMethodID(globalStateClass,"fromInt","(I)Lorg/linphone/core/LinphoneCore$GlobalState;");
......@@ -454,7 +451,6 @@ public:
jobject core;
jclass listenerClass;
jmethodID displayStatusId;
jmethodID newSubscriptionRequestId;
jmethodID notifyPresenceReceivedId;
jmethodID messageReceivedId;
......@@ -835,10 +831,6 @@ public:
memset(vTable, 0, sizeof(LinphoneCoreVTable));
if (ljb->displayStatusId) {
vTable->display_status = displayStatusCb;
}
if (ljb->globalStateId) {
vTable->global_state_changed = globalStateChange;
}
......@@ -958,24 +950,6 @@ public:
LinphoneCoreVTable vTable;
static void displayStatusCb(LinphoneCore *lc, const char *message) {
JNIEnv *env = 0;
jint result = jvm->AttachCurrentThread(&env,NULL);
if (result != 0) {
ms_error("cannot attach VM");
return;
}
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_core_get_user_data(lc);
LinphoneCoreVTable *table = linphone_core_get_current_vtable(lc);
LinphoneCoreData* lcData = (LinphoneCoreData*)linphone_core_v_table_get_user_data(table);
jstring msg = message ? env->NewStringUTF(message) : NULL;
env->CallVoidMethod(lcData->listener,ljb->displayStatusId,lcData->core,msg);
handle_possible_java_exception(env, lcData->listener);
if (msg) {
env->DeleteLocalRef(msg);
}
}
static void authInfoRequested(LinphoneCore *lc, const char *realm, const char *username, const char *domain) {
JNIEnv *env = 0;
jint result = jvm->AttachCurrentThread(&env,NULL);
......
......@@ -106,11 +106,7 @@ char *linphone_payload_type_get_description(const LinphonePayloadType *pt) {
static const char *_linphone_core_get_payload_type_codec_description(const LinphoneCore *lc, const OrtpPayloadType *pt) {
if (ms_factory_codec_supported(lc->factory, pt->mime_type)){
MSFilterDesc *desc=ms_factory_get_encoder(lc->factory, pt->mime_type);
#ifdef ENABLE_NLS
return dgettext("mediastreamer",desc->text);
#else
return desc->text;
#endif
}
return NULL;
}
......
......@@ -60,32 +60,6 @@
#define LIBLINPHONE_VERSION LINPHONE_VERSION
#endif
#ifdef ENABLE_NLS
#ifdef _MSC_VER
// prevent libintl.h from re-defining fprintf and vfprintf
#ifndef fprintf
#define fprintf fprintf
#endif
#ifndef vfprintf
#define vfprintf vfprintf
#endif
#define _GL_STDIO_H
#endif
#include <libintl.h>
#ifndef _
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#endif
#else
#ifndef _
#define _(something) (something)
#endif
#ifndef ngettext
#define ngettext(singular, plural, number) (((number)==1)?(singular):(plural))
#endif
#endif
#ifdef __ANDROID__
#include <jni.h>
#endif
......@@ -1702,11 +1676,6 @@ void linphone_core_notify_global_state_changed(LinphoneCore *lc, LinphoneGlobalS
void linphone_core_notify_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message);
void linphone_core_notify_call_encryption_changed(LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token);
void linphone_core_notify_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message);
void linphone_core_notify_show_interface(LinphoneCore *lc);
void linphone_core_notify_display_status(LinphoneCore *lc, const char *message);
void linphone_core_notify_display_message(LinphoneCore *lc, const char *message);
void linphone_core_notify_display_warning(LinphoneCore *lc, const char *message);
void linphone_core_notify_display_url(LinphoneCore *lc, const char *message, const char *url);
void linphone_core_notify_new_subscription_requested(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
void linphone_core_notify_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username, const char *domain);
void linphone_core_notify_authentication_requested(LinphoneCore *lc, LinphoneAuthInfo *auth_info, LinphoneAuthMethod method);
......
......@@ -362,18 +362,10 @@ LinphoneStatus linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const c
}
bool_t linphone_proxy_config_check(LinphoneCore *lc, LinphoneProxyConfig *cfg){
if (cfg->reg_proxy==NULL){
if (lc)
linphone_core_notify_display_warning(lc,_("The sip proxy address you entered is invalid, it must start with \"sip:\""
" followed by a hostname."));
if (cfg->reg_proxy==NULL)
return FALSE;
}
if (cfg->identity_address==NULL){
if (lc)
linphone_core_notify_display_warning(lc,_("The sip identity you entered is invalid.\nIt should look like "
"sip:username@proxydomain, such as sip:alice@example.net"));
if (cfg->identity_address==NULL)
return FALSE;
}
return TRUE;
}
......@@ -741,13 +733,7 @@ LinphoneAddress* linphone_proxy_config_normalize_sip_uri(LinphoneProxyConfig *pr
if (!username || *username=='\0') return NULL;
if (is_enum(username,&enum_domain)){
if (proxy) {
linphone_core_notify_display_status(proxy->lc,_("Looking for telephone number destination..."));
}
if (enum_lookup(enum_domain,&enumres)<0){
if (proxy) {
linphone_core_notify_display_status(proxy->lc,_("Could not resolve this number."));
}
ms_free(enum_domain);
return NULL;
}
......@@ -1226,7 +1212,6 @@ LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LinphoneCore* lc
static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){
SipSetupContext *ssc;
SipSetup *ss=sip_setup_lookup(cfg->type);
LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
unsigned int caps;
if (!ss) return ;
ssc=sip_setup_context_new(ss,cfg);
......@@ -1237,14 +1222,8 @@ static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){
}
caps=(unsigned int)sip_setup_context_get_capabilities(ssc);
if (caps & SIP_SETUP_CAP_ACCOUNT_MANAGER){
if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL,NULL)!=0){
{
char *tmp=ms_strdup_printf(_("Could not login as %s"),cfg->reg_identity);
linphone_core_notify_display_warning(lc,tmp);
ms_free(tmp);
}
if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL,NULL)!=0)
return;
}
}
if (caps & SIP_SETUP_CAP_PROXY_PROVIDER){
char proxy[256];
......@@ -1314,14 +1293,6 @@ void * linphone_proxy_config_get_user_data(const LinphoneProxyConfig *cfg) {
void linphone_proxy_config_set_state(LinphoneProxyConfig *cfg, LinphoneRegistrationState state, const char *message){
LinphoneCore *lc=cfg->lc;
if (state==LinphoneRegistrationProgress) {
char *msg=ortp_strdup_printf(_("Refreshing on %s..."), linphone_proxy_config_get_identity(cfg));
linphone_core_notify_display_status(lc,msg);
ms_free(msg);
}
if (cfg->state!=state || state==LinphoneRegistrationOk) { /*allow multiple notification of LinphoneRegistrationOk for refreshing*/
ms_message("Proxy config [%p] for identity [%s] moving from state [%s] to [%s] on core [%p]" ,
cfg,
......
......@@ -102,41 +102,7 @@ void linphone_core_notify_registration_state_changed(LinphoneCore *lc, LinphoneP
NOTIFY_IF_EXIST(registration_state_changed, lc,cfg,cstate,message);
cleanup_dead_vtable_refs(lc);
}
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
void linphone_core_notify_show_interface(LinphoneCore *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);
cleanup_dead_vtable_refs(lc);
}
void linphone_core_notify_display_message(LinphoneCore *lc, const char *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);
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);
cleanup_dead_vtable_refs(lc);
}
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
void linphone_core_notify_notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf) {
NOTIFY_IF_EXIST(notify_presence_received, lc, lf);
cleanup_dead_vtable_refs(lc);
......
......@@ -140,34 +140,6 @@ LINPHONE_PUBLIC const LinphoneAddress * linphone_core_get_current_call_remote_ad
* @{
**/
/**
* Callback prototype
* @deprecated
* @donotwrap
*/
typedef void (*ShowInterfaceCb)(LinphoneCore *lc);
/**
* Callback prototype
* @deprecated
* @donotwrap
*/
typedef void (*DisplayStatusCb)(LinphoneCore *lc, const char *message);
/**
* Callback prototype
* @deprecated
* @donotwrap
*/
typedef void (*DisplayMessageCb)(LinphoneCore *lc, const char *message);
/**
* Callback prototype
* @deprecated
* @donotwrap
*/
typedef void (*DisplayUrlCb)(LinphoneCore *lc, const char *message, const char *url);
/**
* Callback prototype
*/
......@@ -202,11 +174,6 @@ typedef struct _LinphoneCoreVTable{
LinphoneCoreNotifyReceivedCb notify_received; /**< Notifies a an event notification, see linphone_core_subscribe() */
LinphoneCorePublishStateChangedCb publish_state_changed;/**Notifies publish state change (only from #LinphoneEvent api)*/
LinphoneCoreConfiguringStatusCb configuring_status; /** Notifies configuring status changes */
LINPHONE_DEPRECATED DisplayStatusCb display_status; /**< @deprecated Callback that notifies various events with human readable text.*/
LINPHONE_DEPRECATED DisplayMessageCb display_message;/**< @deprecated Callback to display a message to the user */
LINPHONE_DEPRECATED DisplayMessageCb display_warning;/**< @deprecated Callback to display a warning to the user */
LINPHONE_DEPRECATED DisplayUrlCb display_url; /**< @deprecated */
LINPHONE_DEPRECATED ShowInterfaceCb show; /**< vNotifies the application that it should show up*/
LINPHONE_DEPRECATED LinphoneCoreTextMessageReceivedCb text_received; /**< @deprecated, use #message_received instead <br> A text message has been received */
LINPHONE_DEPRECATED LinphoneCoreFileTransferRecvCb file_transfer_recv; /**< @deprecated Callback to store file received attached to a #LinphoneChatMessage */
LINPHONE_DEPRECATED LinphoneCoreFileTransferSendCb file_transfer_send; /**< @deprecated Callback to collect file chunk to be sent for a #LinphoneChatMessage */
......
2002-08-06 GNU <bug-gnu-gettext@gnu.org>
* Version 0.11.5 released.
This diff is collapsed.
GNU gettext library from gettext-0.11.5
This diff is collapsed.
/* Compatibility code for gettext-using-catgets interface.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
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, 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <string.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# endif
#endif
#ifdef HAVE_NL_TYPES_H
# include <nl_types.h>
#endif
#include "libgettext.h"
/* @@ end of prolog @@ */
/* XPG3 defines the result of `setlocale (category, NULL)' as:
``Directs `setlocale()' to query `category' and return the current
setting of `local'.''