Commit 33d7a384 authored by Ronan's avatar Ronan

feat(General): remove LINPHONE_NAMESPACE

parent d2c788a0
......@@ -28,7 +28,7 @@
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
static void _linphone_auth_info_uninit(LinphoneAuthInfo *obj);
static void _linphone_auth_info_copy(LinphoneAuthInfo *dst, const LinphoneAuthInfo *src);
......
......@@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sal_impl.h"
#include "sal/sal.hpp"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
SalReason _sal_reason_from_sip_code(int code) {
if (code>=100 && code<300) return SalReasonNone;
......
......@@ -42,7 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "conference/session/media-session.h"
#include "conference/session/media-session-p.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
static void register_failure(SalOp *op);
......@@ -62,7 +62,7 @@ static bool_t already_a_call_with_remote_address(const LinphoneCore *lc, const L
}
static LinphoneCall * look_for_broken_call_to_replace(LINPHONE_NAMESPACE::SalOp *h, LinphoneCore *lc) {
static LinphoneCall * look_for_broken_call_to_replace(LinphonePrivate::SalOp *h, LinphoneCore *lc) {
const bctbx_list_t *calls = linphone_core_get_calls(lc);
const bctbx_list_t *it = calls;
while (it != NULL) {
......
......@@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "linphone/core.h"
#include "private.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
LinphoneCardDavContext* linphone_carddav_context_new(LinphoneFriendList *lfl) {
LinphoneCardDavContext *carddav_context = NULL;
......
......@@ -43,7 +43,7 @@
#include "content/content-type.h"
using namespace std;
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
void linphone_core_disable_chat(LinphoneCore *lc, LinphoneReason deny_reason) {
lc->chat_deny_code = deny_reason;
......
......@@ -197,7 +197,7 @@ void linphone_error_info_from_sal_reason_ei(LinphoneErrorInfo *ei, const SalErro
}
}
void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LINPHONE_NAMESPACE::SalOp *op){
void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LinphonePrivate::SalOp *op){
if (op==NULL) {
/*leave previous values in LinphoneErrorInfo, the op may have been released already.*/
return;
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
const char * linphone_subscription_dir_to_string(LinphoneSubscriptionDir dir){
switch(dir){
......@@ -81,7 +81,7 @@ static void linphone_event_release(LinphoneEvent *lev){
linphone_event_unref(lev);
}
static LinphoneEvent * linphone_event_new_base(LinphoneCore *lc, LinphoneSubscriptionDir dir, const char *name, LINPHONE_NAMESPACE::SalEventOp *op){
static LinphoneEvent * linphone_event_new_base(LinphoneCore *lc, LinphoneSubscriptionDir dir, const char *name, LinphonePrivate::SalEventOp *op){
LinphoneEvent *lev=belle_sip_object_new(LinphoneEvent);
lev->lc=lc;
lev->dir=dir;
......
......@@ -43,7 +43,7 @@
#include "c-wrapper/c-wrapper.h"
using namespace std;
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
const char *str=NULL;
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneFriendListCbs);
......
......@@ -28,7 +28,7 @@
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
struct _LinphoneInfoMessage{
belle_sip_object_t base;
......
......@@ -130,7 +130,7 @@ void linphone_core_zrtp_cache_db_init(LinphoneCore *lc, const char *fileName);
#include "contact_providers_priv.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc);
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
extern const char *__policy_enum_to_str(LinphoneSubscribePolicy pol);
......
......@@ -221,7 +221,7 @@ void linphone_call_notify_info_message_received(LinphoneCall *call, const Linpho
void linphone_call_notify_ack_processing(LinphoneCall *call, LinphoneHeaders *msg, bool_t is_received);
LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to, const LinphoneCallParams *params, LinphoneProxyConfig *cfg);
LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to, LINPHONE_NAMESPACE::SalCallOp *op);
LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to, LinphonePrivate::SalCallOp *op);
void _linphone_call_set_new_params(LinphoneCall *call, const LinphoneCallParams *params);
void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const char *message);
/* private: */
......@@ -229,10 +229,10 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *fr
void linphone_call_set_transfer_state(LinphoneCall* call, LinphoneCallState state);
LinphonePlayer *linphone_call_build_player(LinphoneCall*call);
void linphone_call_refresh_sockets(LinphoneCall *call);
void linphone_call_replace_op(LinphoneCall *call, LINPHONE_NAMESPACE::SalOp *op);
void linphone_call_replace_op(LinphoneCall *call, LinphonePrivate::SalOp *op);
void linphone_call_reinvite_to_recover_from_connection_loss(LinphoneCall *call);
LINPHONE_NAMESPACE::SalCallOp *linphone_call_get_op(const LinphoneCall *call);
LinphonePrivate::SalCallOp *linphone_call_get_op(const LinphoneCall *call);
LinphoneProxyConfig * linphone_call_get_dest_proxy(const LinphoneCall *call);
LINPHONE_PUBLIC MediaStream * linphone_call_get_stream(LinphoneCall *call, LinphoneStreamType type);
LinphoneCallLog * linphone_call_get_log(const LinphoneCall *call);
......@@ -318,15 +318,15 @@ void _linphone_friend_release(LinphoneFriend *lf);
LINPHONE_PUBLIC void linphone_friend_update_subscribes(LinphoneFriend *fr, bool_t only_when_registered);
void linphone_friend_notify(LinphoneFriend *lf, LinphonePresenceModel *presence);
void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc);
void linphone_friend_add_incoming_subscription(LinphoneFriend *lf, LINPHONE_NAMESPACE::SalOp *op);
void linphone_friend_remove_incoming_subscription(LinphoneFriend *lf, LINPHONE_NAMESPACE::SalOp *op);
void linphone_friend_add_incoming_subscription(LinphoneFriend *lf, LinphonePrivate::SalOp *op);
void linphone_friend_remove_incoming_subscription(LinphoneFriend *lf, LinphonePrivate::SalOp *op);
const char * linphone_friend_phone_number_to_sip_uri(LinphoneFriend *lf, const char *phone_number);
const char * linphone_friend_sip_uri_to_phone_number(LinphoneFriend *lf, const char *uri);
void linphone_friend_clear_presence_models(LinphoneFriend *lf);
LinphoneFriend *linphone_friend_list_find_friend_by_inc_subscribe(const LinphoneFriendList *list, LINPHONE_NAMESPACE::SalOp *op);
LinphoneFriend *linphone_friend_list_find_friend_by_out_subscribe(const LinphoneFriendList *list, LINPHONE_NAMESPACE::SalOp *op);
LinphoneFriend *linphone_core_find_friend_by_out_subscribe(const LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
LinphoneFriend *linphone_core_find_friend_by_inc_subscribe(const LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
LinphoneFriend *linphone_friend_list_find_friend_by_inc_subscribe(const LinphoneFriendList *list, LinphonePrivate::SalOp *op);
LinphoneFriend *linphone_friend_list_find_friend_by_out_subscribe(const LinphoneFriendList *list, LinphonePrivate::SalOp *op);
LinphoneFriend *linphone_core_find_friend_by_out_subscribe(const LinphoneCore *lc, LinphonePrivate::SalOp *op);
LinphoneFriend *linphone_core_find_friend_by_inc_subscribe(const LinphoneCore *lc, LinphonePrivate::SalOp *op);
MSList *linphone_find_friend_by_address(MSList *fl, const LinphoneAddress *addr, LinphoneFriend **lf);
bool_t linphone_core_should_subscribe_friends_only_when_registered(const LinphoneCore *lc);
void linphone_core_update_friends_subscriptions(LinphoneCore *lc);
......@@ -361,19 +361,19 @@ static MS2_INLINE void set_string(char **dest, const char *src, bool_t lowercase
}
}
void linphone_process_authentication(LinphoneCore* lc, LINPHONE_NAMESPACE::SalOp *op);
void linphone_authentication_ok(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
void linphone_subscription_new(LinphoneCore *lc, LINPHONE_NAMESPACE::SalSubscribeOp *op, const char *from);
void linphone_process_authentication(LinphoneCore* lc, LinphonePrivate::SalOp *op);
void linphone_authentication_ok(LinphoneCore *lc, LinphonePrivate::SalOp *op);
void linphone_subscription_new(LinphoneCore *lc, LinphonePrivate::SalSubscribeOp *op, const char *from);
void linphone_core_send_presence(LinphoneCore *lc, LinphonePresenceModel *presence);
void linphone_notify_parse_presence(const char *content_type, const char *content_subtype, const char *body, SalPresenceModel **result);
void linphone_notify_convert_presence_to_xml(LINPHONE_NAMESPACE::SalOp *op, SalPresenceModel *presence, const char *contact, char **content);
void linphone_notify_recv(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op, SalSubscribeStatus ss, SalPresenceModel *model);
void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
void linphone_notify_convert_presence_to_xml(LinphonePrivate::SalOp *op, SalPresenceModel *presence, const char *contact, char **content);
void linphone_notify_recv(LinphoneCore *lc, LinphonePrivate::SalOp *op, SalSubscribeStatus ss, SalPresenceModel *model);
void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, LinphonePrivate::SalOp *op);
void linphone_core_soundcard_hint_check(LinphoneCore* lc);
void linphone_subscription_answered(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
void linphone_subscription_closed(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op);
void linphone_subscription_answered(LinphoneCore *lc, LinphonePrivate::SalOp *op);
void linphone_subscription_closed(LinphoneCore *lc, LinphonePrivate::SalOp *op);
void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc);
......@@ -422,7 +422,7 @@ LINPHONE_PUBLIC void linphone_core_get_local_ip(LinphoneCore *lc, int af, const
LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LinphoneCore *lc, int index);
void linphone_proxy_config_write_to_config_file(LinphoneConfig* config,LinphoneProxyConfig *obj, int index);
int linphone_core_message_received(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op, const SalMessage *msg);
int linphone_core_message_received(LinphoneCore *lc, LinphonePrivate::SalOp *op, const SalMessage *msg);
void linphone_core_real_time_text_received(LinphoneCore *lc, LinphoneChatRoom *cr, uint32_t character, LinphoneCall *call);
void linphone_call_init_media_streams(LinphoneCall *call);
......@@ -446,7 +446,7 @@ int linphone_call_start_update(LinphoneCall *call);
int linphone_call_start_accept_update(LinphoneCall *call, LinphoneCallState next_state, const char *state_info);
void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call);
bool_t linphone_core_incompatible_security(LinphoneCore *lc, SalMediaDescription *md);
extern LINPHONE_NAMESPACE::Sal::Callbacks linphone_sal_callbacks;
extern LinphonePrivate::Sal::Callbacks linphone_sal_callbacks;
LINPHONE_PUBLIC bool_t linphone_core_rtcp_enabled(const LinphoneCore *lc);
LINPHONE_PUBLIC bool_t linphone_core_symmetric_rtp_enabled(LinphoneCore*lc);
......@@ -488,7 +488,7 @@ struct _LinphoneProxyConfig
char *contact_uri_params;
int expires;
int publish_expires;
LINPHONE_NAMESPACE::SalRegisterOp *op;
LinphonePrivate::SalRegisterOp *op;
SalCustomHeader *sent_headers;
char *type;
struct _SipSetupContext *ssctx;
......@@ -567,7 +567,7 @@ struct _LinphoneFriend{
void *user_data;
LinphoneAddress *uri;
MSList *insubs; /*list of SalOp. There can be multiple instances of a same Friend that subscribe to our presence*/
LINPHONE_NAMESPACE::SalPresenceOp *outsub;
LinphonePrivate::SalPresenceOp *outsub;
LinphoneSubscribePolicy pol;
MSList *presence_models; /* list of LinphoneFriendPresence. It associates SIP URIs and phone numbers with their respective presence models. */
MSList *phone_number_sip_uri_map; /* list of LinphoneFriendPhoneNumberSipUri. It associates phone numbers with their corresponding SIP URIs. */
......@@ -805,7 +805,7 @@ struct _LinphoneCore
MSFactory* factory;
MSList* vtable_refs;
int vtable_notify_recursion;
LINPHONE_NAMESPACE::Sal *sal;
LinphonePrivate::Sal *sal;
LinphoneGlobalState state;
struct _LpConfig *config;
MSList *default_audio_codecs;
......@@ -941,7 +941,7 @@ struct _LinphoneEvent{
LinphoneErrorInfo *ei;
LinphoneSubscriptionDir dir;
LinphoneCore *lc;
LINPHONE_NAMESPACE::SalEventOp *op;
LinphonePrivate::SalEventOp *op;
SalCustomHeader *send_custom_headers;
LinphoneSubscriptionState subscription_state;
LinphonePublishState publish_state;
......@@ -1099,8 +1099,8 @@ belle_http_request_t * linphone_chat_message_get_http_request(const LinphoneChat
void linphone_chat_message_set_http_request(LinphoneChatMessage *msg, belle_http_request_t *request);
void linphone_chat_message_set_file_transfer_information(LinphoneChatMessage *msg, LinphoneContent *content);
LinphoneChatMessageDir linphone_chat_message_get_direction(const LinphoneChatMessage *msg);
LINPHONE_NAMESPACE::SalOp * linphone_chat_message_get_sal_op(const LinphoneChatMessage *msg);
void linphone_chat_message_set_sal_op(LinphoneChatMessage *msg, LINPHONE_NAMESPACE::SalOp *op);
LinphonePrivate::SalOp * linphone_chat_message_get_sal_op(const LinphoneChatMessage *msg);
void linphone_chat_message_set_sal_op(LinphoneChatMessage *msg, LinphonePrivate::SalOp *op);
void linphone_chat_message_destroy(LinphoneChatMessage* msg);
void linphone_chat_message_update_state(LinphoneChatMessage *msg, LinphoneChatMessageState new_state);
void linphone_chat_message_set_is_secured(LinphoneChatMessage *msg, bool_t secured);
......@@ -1119,10 +1119,10 @@ void linphone_chat_message_send_imdn(LinphoneChatMessage *cm, ImdnType imdn_type
void linphone_core_play_named_tone(LinphoneCore *lc, LinphoneToneID id);
bool_t linphone_core_tone_indications_enabled(LinphoneCore*lc);
const char *linphone_core_create_uuid(LinphoneCore *lc);
void linphone_configure_op(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op, const LinphoneAddress *dest, SalCustomHeader *headers, bool_t with_contact);
void linphone_configure_op_with_proxy(LinphoneCore *lc, LINPHONE_NAMESPACE::SalOp *op, const LinphoneAddress *dest, SalCustomHeader *headers, bool_t with_contact, LinphoneProxyConfig *proxy);
void linphone_configure_op(LinphoneCore *lc, LinphonePrivate::SalOp *op, const LinphoneAddress *dest, SalCustomHeader *headers, bool_t with_contact);
void linphone_configure_op_with_proxy(LinphoneCore *lc, LinphonePrivate::SalOp *op, const LinphoneAddress *dest, SalCustomHeader *headers, bool_t with_contact, LinphoneProxyConfig *proxy);
void linphone_call_create_op(LinphoneCall *call);
void linphone_core_notify_info_message(LinphoneCore* lc,LINPHONE_NAMESPACE::SalOp *op, SalBodyHandler *body);
void linphone_core_notify_info_message(LinphoneCore* lc,LinphonePrivate::SalOp *op, SalBodyHandler *body);
LinphoneContent * linphone_content_new(void);
LinphoneContent * linphone_content_copy(const LinphoneContent *ref);
SalBodyHandler *sal_body_handler_from_content(const LinphoneContent *content);
......@@ -1130,12 +1130,12 @@ SalReason linphone_reason_to_sal(LinphoneReason reason);
LinphoneReason linphone_reason_from_sal(SalReason reason);
void linphone_error_info_to_sal(const LinphoneErrorInfo* ei, SalErrorInfo* sei);
LinphoneEvent *linphone_event_new(LinphoneCore *lc, LinphoneSubscriptionDir dir, const char *name, int expires);
LinphoneEvent *linphone_event_new_with_op(LinphoneCore *lc, LINPHONE_NAMESPACE::SalEventOp *op, LinphoneSubscriptionDir dir, const char *name);
LinphoneEvent *linphone_event_new_with_op(LinphoneCore *lc, LinphonePrivate::SalEventOp *op, LinphoneSubscriptionDir dir, const char *name);
void linphone_event_unpublish(LinphoneEvent *lev);
/**
* Useful for out of dialog notify
* */
LinphoneEvent *linphone_event_new_with_out_of_dialog_op(LinphoneCore *lc, LINPHONE_NAMESPACE::SalEventOp *op, LinphoneSubscriptionDir dir, const char *name);
LinphoneEvent *linphone_event_new_with_out_of_dialog_op(LinphoneCore *lc, LinphonePrivate::SalEventOp *op, LinphoneSubscriptionDir dir, const char *name);
void linphone_event_set_internal(LinphoneEvent *lev, bool_t internal);
bool_t linphone_event_is_internal(LinphoneEvent *lev);
void linphone_event_set_state(LinphoneEvent *lev, LinphoneSubscriptionState state);
......@@ -1358,7 +1358,7 @@ void linphone_xml_xpath_context_init_carddav_ns(xmlparsing_context_t *xml_ctx);
char * linphone_timestamp_to_rfc3339_string(time_t timestamp);
void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LINPHONE_NAMESPACE::SalOp *op);
void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LinphonePrivate::SalOp *op);
void payload_type_set_enable(OrtpPayloadType *pt, bool_t value);
bool_t payload_type_enabled(const OrtpPayloadType *pt);
......
......@@ -33,7 +33,7 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org)
#include "address/address-p.h"
#include "c-wrapper/c-wrapper.h"
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
/*store current config related to server location*/
static void linphone_proxy_config_store_server_config(LinphoneProxyConfig* cfg) {
......
......@@ -870,7 +870,7 @@ LINPHONE_END_NAMESPACE
/* C++ to C wrapping functions */
/*******************************/
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
extern "C" {
......
......@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define VCARD_MD5_HASH_SIZE 16
using namespace std;
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
struct _LinphoneVcardContext {
shared_ptr<belcard::BelCardParser> parser;
......
......@@ -21,10 +21,8 @@
// =============================================================================
#define LINPHONE_NAMESPACE LinphonePrivate
#ifdef __cplusplus
#define LINPHONE_BEGIN_NAMESPACE namespace LINPHONE_NAMESPACE {
#define LINPHONE_BEGIN_NAMESPACE namespace LinphonePrivate {
#define LINPHONE_END_NAMESPACE }
#else
#define LINPHONE_BEGIN_NAMESPACE
......@@ -68,7 +66,7 @@ void l_assert (const char *condition, const char *file, int line);
#ifndef DEBUG
#define L_ASSERT(CONDITION) static_cast<void>(false && (CONDITION))
#else
#define L_ASSERT(CONDITION) ((CONDITION) ? static_cast<void>(0) : LINPHONE_NAMESPACE::l_assert(#CONDITION, __FILE__, __LINE__))
#define L_ASSERT(CONDITION) ((CONDITION) ? static_cast<void>(0) : LinphonePrivate::l_assert(#CONDITION, __FILE__, __LINE__))
#endif
#ifndef _MSC_VER
......
......@@ -28,7 +28,7 @@ using namespace std;
// =============================================================================
LinphoneAddress *linphone_address_new (const char *address) {
LINPHONE_NAMESPACE::Address *cppPtr = new LINPHONE_NAMESPACE::Address(L_C_TO_STRING(address));
LinphonePrivate::Address *cppPtr = new LinphonePrivate::Address(L_C_TO_STRING(address));
if (!cppPtr->isValid()) {
delete cppPtr;
return nullptr;
......@@ -94,7 +94,7 @@ LinphoneTransportType linphone_address_get_transport (const LinphoneAddress *add
}
LinphoneStatus linphone_address_set_transport (LinphoneAddress *address, LinphoneTransportType transport) {
return !L_GET_CPP_PTR_FROM_C_OBJECT(address)->setTransport(static_cast<LINPHONE_NAMESPACE::Transport>(transport));
return !L_GET_CPP_PTR_FROM_C_OBJECT(address)->setTransport(static_cast<LinphonePrivate::Transport>(transport));
}
bool_t linphone_address_get_secure (const LinphoneAddress *address) {
......
......@@ -48,8 +48,8 @@ L_DECLARE_C_OBJECT_IMPL_WITH_XTORS(Call,
SalMediaDescription *localdesc;
SalMediaDescription *resultdesc;
struct _LinphoneCallLog *log;
LINPHONE_NAMESPACE::SalOp *op;
LINPHONE_NAMESPACE::SalOp *ping_op;
LinphonePrivate::SalOp *op;
LinphonePrivate::SalOp *ping_op;
LinphoneCallState transfer_state; /*idle if no transfer*/
struct _AudioStream *audiostream; /**/
struct _VideoStream *videostream;
......@@ -325,7 +325,7 @@ int linphone_call_start_invite (LinphoneCall *call, const LinphoneAddress *desti
return 0;
}
void linphone_call_replace_op (LinphoneCall *call, LINPHONE_NAMESPACE::SalOp *op) {
void linphone_call_replace_op (LinphoneCall *call, LinphonePrivate::SalOp *op) {
#if 0
SalOp *oldop = call->op;
LinphoneCallState oldstate = linphone_call_get_state(call);
......@@ -507,7 +507,7 @@ void linphone_call_refresh_sockets (LinphoneCall *call) {
#endif
}
LINPHONE_NAMESPACE::SalCallOp * linphone_call_get_op (const LinphoneCall *call) {
LinphonePrivate::SalCallOp * linphone_call_get_op (const LinphoneCall *call) {
return L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp();
}
......@@ -1193,7 +1193,7 @@ LinphoneCall *linphone_call_new_outgoing (LinphoneCore *lc, const LinphoneAddres
return call;
}
LinphoneCall *linphone_call_new_incoming (LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to, LINPHONE_NAMESPACE::SalCallOp *op) {
LinphoneCall *linphone_call_new_incoming (LinphoneCore *lc, const LinphoneAddress *from, const LinphoneAddress *to, LinphonePrivate::SalCallOp *op) {
LinphoneCall *call = L_INIT(Call);
L_SET_CPP_PTR_FROM_C_OBJECT(call, make_shared<LinphonePrivate::Call>(call, lc, LinphoneCallIncoming,
*L_GET_CPP_PTR_FROM_C_OBJECT(from), *L_GET_CPP_PTR_FROM_C_OBJECT(to),
......
......@@ -34,7 +34,7 @@
// =============================================================================
using namespace std;
using namespace LINPHONE_NAMESPACE;
using namespace LinphonePrivate;
static void _linphone_chat_message_constructor (LinphoneChatMessage *msg);
static void _linphone_chat_message_destructor (LinphoneChatMessage *msg);
......
......@@ -42,7 +42,7 @@ using namespace std;
LinphoneEventLog *linphone_event_log_new () {
LinphoneEventLog *event_log = _linphone_EventLog_init();
L_SET_CPP_PTR_FROM_C_OBJECT(event_log, new LINPHONE_NAMESPACE::EventLog());
L_SET_CPP_PTR_FROM_C_OBJECT(event_log, new LinphonePrivate::EventLog());
return event_log;
}
......@@ -65,8 +65,8 @@ LinphoneCallEvent *linphone_call_event_new (LinphoneEventLogType type, LinphoneC
LinphoneCallEvent *call_event = _linphone_CallEvent_init();
L_SET_CPP_PTR_FROM_C_OBJECT(
call_event,
new LINPHONE_NAMESPACE::CallEvent(
static_cast<LINPHONE_NAMESPACE::EventLog::Type>(type),
new LinphonePrivate::CallEvent(
static_cast<LinphonePrivate::EventLog::Type>(type),
L_GET_CPP_PTR_FROM_C_OBJECT(call)
)
);
......@@ -124,7 +124,7 @@ LinphoneChatMessageEvent *linphone_chat_message_event_new (LinphoneChatMessage *
LinphoneChatMessageEvent *chat_message_event = _linphone_ChatMessageEvent_init();
L_SET_CPP_PTR_FROM_C_OBJECT(
chat_message_event,
new LINPHONE_NAMESPACE::ChatMessageEvent(
new LinphonePrivate::ChatMessageEvent(
L_GET_CPP_PTR_FROM_C_OBJECT(chat_message)
)
);
......
......@@ -489,10 +489,10 @@ LINPHONE_END_NAMESPACE
LINPHONE_END_NAMESPACE
#define L_CPP_TYPE_OF_C_TYPE(C_TYPE) \
LINPHONE_NAMESPACE::CTypeMetaInfo<Linphone ## C_TYPE>::cppType
LinphonePrivate::CTypeMetaInfo<Linphone ## C_TYPE>::cppType
#define L_CPP_TYPE_OF_C_OBJECT(C_OBJECT) \
LINPHONE_NAMESPACE::CTypeMetaInfo<std::remove_const<std::remove_pointer<decltype(C_OBJECT)>::type>::type>::cppType
LinphonePrivate::CTypeMetaInfo<std::remove_const<std::remove_pointer<decltype(C_OBJECT)>::type>::type>::cppType
// -----------------------------------------------------------------------------
// C object declaration.
......@@ -518,7 +518,7 @@ LINPHONE_END_NAMESPACE
// Declare clonable wrapped C object.
#define L_DECLARE_C_CLONABLE_STRUCT_IMPL(C_TYPE, ...) \
static_assert(LINPHONE_NAMESPACE::CTypeMetaInfo<Linphone ## C_TYPE>::defined, "Type is not defined."); \
static_assert(LinphonePrivate::CTypeMetaInfo<Linphone ## C_TYPE>::defined, "Type is not defined."); \
struct _Linphone ## C_TYPE { \
belle_sip_object_t base; \
L_CPP_TYPE_OF_C_TYPE(C_TYPE) *cppPtr; \
......@@ -547,7 +547,7 @@ LINPHONE_END_NAMESPACE
#define L_DECLARE_C_OBJECT_NEW_DEFAULT(C_TYPE, C_NAME) \
Linphone ## C_TYPE * linphone_ ## C_NAME ## _new() { \
Linphone ## C_TYPE *object = _linphone_ ## C_TYPE ## _init(); \
object->cppPtr = std::make_shared<LINPHONE_NAMESPACE::C_TYPE>(); \
object->cppPtr = std::make_shared<LinphonePrivate::C_TYPE>(); \
return object; \
}
......@@ -564,11 +564,11 @@ LINPHONE_END_NAMESPACE
// Get/set the cpp-ptr of a wrapped C object.
#define L_GET_CPP_PTR_FROM_C_OBJECT_1_ARGS(C_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC(C_OBJECT)
LinphonePrivate::Wrapper::getCppPtrFromC(C_OBJECT)
#define L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS(C_OBJECT, CPP_TYPE) \
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC< \
LinphonePrivate::Wrapper::getCppPtrFromC< \
std::remove_pointer<decltype(C_OBJECT)>::type, \
LINPHONE_NAMESPACE::CPP_TYPE \
LinphonePrivate::CPP_TYPE \
>(C_OBJECT)
#define L_GET_CPP_PTR_FROM_C_OBJECT_MACRO_CHOOSER(...) \
......@@ -579,13 +579,13 @@ LINPHONE_END_NAMESPACE
// Set the cpp-ptr of a wrapped C object.
#define L_SET_CPP_PTR_FROM_C_OBJECT(C_OBJECT, CPP_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::setCppPtrFromC(C_OBJECT, CPP_OBJECT)
LinphonePrivate::Wrapper::setCppPtrFromC(C_OBJECT, CPP_OBJECT)
// Get the private data of a shared or simple cpp-ptr.
#define L_GET_PRIVATE_1_ARGS(CPP_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::getPrivate(LINPHONE_NAMESPACE::Utils::getPtr(CPP_OBJECT))
LinphonePrivate::Wrapper::getPrivate(LinphonePrivate::Utils::getPtr(CPP_OBJECT))
#define L_GET_PRIVATE_2_ARGS(CPP_OBJECT, CPP_TYPE) \
LINPHONE_NAMESPACE::Wrapper::cast<CPP_TYPE ## Private>(L_GET_PRIVATE_1_ARGS(CPP_OBJECT))
LinphonePrivate::Wrapper::cast<CPP_TYPE ## Private>(L_GET_PRIVATE_1_ARGS(CPP_OBJECT))
#define L_GET_PRIVATE_MACRO_CHOOSER(...) \
L_EXPAND(L_GET_ARG_3(__VA_ARGS__, L_GET_PRIVATE_2_ARGS, L_GET_PRIVATE_1_ARGS))
......@@ -595,9 +595,9 @@ LINPHONE_END_NAMESPACE
// Get the private data of a shared or simple cpp-ptr of a wrapped C object.
#define L_GET_PRIVATE_FROM_C_OBJECT_1_ARGS(C_OBJECT) \
L_GET_PRIVATE_1_ARGS(LINPHONE_NAMESPACE::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT_1_ARGS(C_OBJECT)))
L_GET_PRIVATE_1_ARGS(LinphonePrivate::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT_1_ARGS(C_OBJECT)))
#define L_GET_PRIVATE_FROM_C_OBJECT_2_ARGS(C_OBJECT, CPP_TYPE) \
L_GET_PRIVATE_1_ARGS(LINPHONE_NAMESPACE::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS(C_OBJECT, CPP_TYPE)))
L_GET_PRIVATE_1_ARGS(LinphonePrivate::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS(C_OBJECT, CPP_TYPE)))
#define L_GET_PRIVATE_FROM_C_OBJECT_MACRO_CHOOSER(...) \
L_EXPAND(L_GET_ARG_3(__VA_ARGS__, L_GET_PRIVATE_FROM_C_OBJECT_2_ARGS, L_GET_PRIVATE_FROM_C_OBJECT_1_ARGS))
......@@ -607,29 +607,29 @@ LINPHONE_END_NAMESPACE
// Get the wrapped C object of a C++ object.
#define L_GET_C_BACK_PTR(CPP_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::getCBackPtr(CPP_OBJECT)
LinphonePrivate::Wrapper::getCBackPtr(CPP_OBJECT)
// Get/set user data on a wrapped C object.
#define L_GET_USER_DATA_FROM_C_OBJECT(C_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::getUserData( \
LINPHONE_NAMESPACE::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT)) \
LinphonePrivate::Wrapper::getUserData( \
LinphonePrivate::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT)) \
)
#define L_SET_USER_DATA_FROM_C_OBJECT(C_OBJECT, VALUE) \
LINPHONE_NAMESPACE::Wrapper::setUserData( \
LINPHONE_NAMESPACE::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT)), \
LinphonePrivate::Wrapper::setUserData( \
LinphonePrivate::Utils::getPtr(L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT)), \
VALUE \
)
// Transforms cpp list and c list.
#define L_GET_C_LIST_FROM_CPP_LIST(CPP_LIST) \
LINPHONE_NAMESPACE::Wrapper::getCListFromCppList(CPP_LIST)
LinphonePrivate::Wrapper::getCListFromCppList(CPP_LIST)
#define L_GET_CPP_LIST_FROM_C_LIST(C_LIST, TYPE) \
LINPHONE_NAMESPACE::Wrapper::getCppListFromCList<TYPE>(C_LIST)
LinphonePrivate::Wrapper::getCppListFromCList<TYPE>(C_LIST)
// Transforms cpp list and c list and convert cpp object to c object.
#define L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(CPP_LIST) \
LINPHONE_NAMESPACE::Wrapper::getResolvedCListFromCppList(CPP_LIST)
LinphonePrivate::Wrapper::getResolvedCListFromCppList(CPP_LIST)
#define L_GET_RESOLVED_CPP_LIST_FROM_C_LIST(C_LIST, C_TYPE) \
LINPHONE_NAMESPACE::Wrapper::getResolvedCppListFromCList<Linphone ## C_TYPE>(C_LIST)
LinphonePrivate::Wrapper::getResolvedCppListFromCList<Linphone ## C_TYPE>(C_LIST)
#endif // ifndef _C_TOOLS_H_
......@@ -339,19 +339,19 @@ static bool coreHeaderIsValid (
template<>
bool Cpim::Parser::coreHeaderIsValid<Cpim::FromHeader>(const string &headerValue) const {
L_D();
return LINPHONE_NAMESPACE::coreHeaderIsValid(d->grammar, "From", headerValue);
return LinphonePrivate::coreHeaderIsValid(d->grammar, "From", headerValue);
}
template<>
bool Cpim::Parser::coreHeaderIsValid<Cpim::ToHeader>(const string &headerValue) const {
L_D();
return LINPHONE_NAMESPACE::coreHeaderIsValid(d->grammar, "To", headerValue);
return LinphonePrivate::coreHeaderIsValid(d->grammar, "To", headerValue);
}
template<>
bool Cpim::Parser::coreHeaderIsValid<Cpim::CcHeader>(const string &headerValue) const {
L_D();
return LINPHONE_NAMESPACE::coreHeaderIsValid(d->grammar, "cc", headerValue);
return LinphonePrivate::coreHeaderIsValid(d->grammar, "cc", headerValue);
}
template<>
......@@ -359,7 +359,7 @@ bool Cpim::Parser::coreHeaderIsValid<Cpim::DateTimeHeader>(const string &headerV
static const int daysInMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
L_D();
if (!LINPHONE_NAMESPACE::coreHeaderIsValid(d->grammar, "DateTime", headerValue))
if (!LinphonePrivate::coreHeaderIsValid(d->grammar, "DateTime", headerValue))
return false;
// Check date.
......@@ -398,26 +398,26 @@ bool Cpim::Parser::coreHeaderIsValid<Cpim::DateTimeHeader>(const string &headerV
template<>
bool Cpim::Parser::coreHeaderIsValid<Cpim::SubjectHeader>(const string &headerValue) const {
L_D();
return LINPHONE_NAMESPACE::coreHeaderIsValid(d->grammar, "Subject", headerValue);
return LinphonePrivate::coreHeaderIsValid(d->grammar, "Subject", headerValue);
}
template<>