Commit 437f4366 authored by Ronan's avatar Ronan
Browse files

feat(c-wrapper): now belle-sip types are declared in this file

parent 96f21ef1
......@@ -20,9 +20,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "linphone/account_creator.h"
#include "linphone/core.h"
#include "linphone/lpconfig.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
#if !_WIN32
#include "regex.h"
#include "regex.h"
#endif
#include <bctoolbox/crypto.h>
......
......@@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "linphone/account_creator_service.h"
#include "linphone/core.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneAccountCreatorService);
......
......@@ -23,9 +23,10 @@
*/
#include "linphone/core.h"
#include "private.h"
#include "linphone/lpconfig.h"
#include "c-wrapper/c-wrapper.h"
static void _linphone_auth_info_uninit(LinphoneAuthInfo *obj);
static void _linphone_auth_info_copy(LinphoneAuthInfo *dst, const LinphoneAuthInfo *src);
......
......@@ -18,9 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
static void linphone_buffer_destroy(LinphoneBuffer *buffer) {
if (buffer->content) belle_sip_free(buffer->content);
......
......@@ -20,23 +20,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define _XOPEN_SOURCE 700 /*required for strptime of GNU libc*/
#include <time.h>
#include "private.h"
#ifdef SQLITE_STORAGE_ENABLED
#ifndef _WIN32
#if !defined(__ANDROID__) && !defined(__QNXNTO__)
# include <langinfo.h>
# include <iconv.h>
# include <string.h>
#endif
#ifndef _WIN32
#if !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif
#else
#include <Windows.h>
#include <Windows.h>
#endif
#define MAX_PATH_SIZE 1024
#include "sqlite3.h"
#include "sqlite3.h"
#endif
#include "c-wrapper/c-wrapper.h"
typedef struct _CallLogStorageResult {
LinphoneCore *core;
bctbx_list_t *result;
......@@ -316,7 +317,7 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *fr
set_call_log_date(cl,cl->start_date_time);
cl->from=from;
cl->to=to;
cl->to=to;
cl->status=LinphoneCallAborted; /*default status*/
cl->quality=-1;
......@@ -561,7 +562,7 @@ const bctbx_list_t *linphone_core_get_call_history(LinphoneCore *lc) {
CallLogStorageResult clsres;
if (!lc || lc->logs_db == NULL) return NULL;
if (lc->call_logs != NULL) return lc->call_logs;
if (lc->call_logs != NULL) return lc->call_logs;
if (lc->max_call_logs != LINPHONE_MAX_CALL_HISTORY_UNLIMITED){
buf = sqlite3_mprintf("SELECT * FROM call_history ORDER BY id DESC LIMIT %i", lc->max_call_logs);
......
......@@ -23,14 +23,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphone/core.h"
#include "private.h"
#include "conference_private.h"
#include <mediastreamer2/msvolume.h>
#include <typeinfo>
#include <list>
#include <algorithm>
#include <list>
#include <string>
#include <typeinfo>
#include <mediastreamer2/msvolume.h>
#include "linphone/core.h"
#include "conference_private.h"
#include "c-wrapper/c-wrapper.h"
using namespace std;
......
......@@ -17,9 +17,10 @@
#ifndef CONTACT_PROVIDERS_PRIV_H
#define CONTACT_PROVIDERS_PRIV_H
#include "private.h"
#include "linphone/core.h"
#include "c-wrapper/c-wrapper.h"
/* Base for contact search and contact provider */
struct _LinphoneContactSearch{
......
......@@ -14,9 +14,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "contact_providers_priv.h"
#include "linphone/contactprovider.h"
#include <linphone/core.h>
#include "linphone/core.h"
#include "contact_providers_priv.h"
/* ############################ *
* LinphoneContactSearchRequest *
......
......@@ -18,9 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
static void linphone_content_set_sal_body_handler(LinphoneContent *content, SalBodyHandler *body_handler) {
if (content->body_handler != NULL) {
......
......@@ -18,11 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include "private.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneErrorInfo);
#include "c-wrapper/c-wrapper.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneErrorInfo);
static void linphone_error_info_reset(LinphoneErrorInfo *ei);
......@@ -182,7 +181,7 @@ void linphone_error_info_from_sal_reason_ei(LinphoneErrorInfo *ei, const SalErro
linphone_error_info_from_sal(ei, reason_ei);
return;
}
if (ei->sub_ei){
if (reason_ei->reason == SalReasonNone){
linphone_error_info_unref(ei->sub_ei);
......@@ -220,12 +219,12 @@ void linphone_error_info_fields_to_sal(const LinphoneErrorInfo* ei, SalErrorInfo
sei->protocol_code = ei->protocol_code;
sei->protocol = bctbx_strdup(ei->protocol);
}
void linphone_error_info_to_sal(const LinphoneErrorInfo* ei, SalErrorInfo* sei){
linphone_error_info_fields_to_sal(ei, sei);
if (ei->sub_ei !=NULL) {
linphone_error_info_to_sal(ei->sub_ei, sei->sub_sei);
}
}
......
......@@ -18,9 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/event.h"
#include "private.h"
#include "linphone/lpconfig.h"
#include "c-wrapper/c-wrapper.h"
const char * linphone_subscription_dir_to_string(LinphoneSubscriptionDir dir){
switch(dir){
case LinphoneSubscriptionIncoming:
......
......@@ -18,17 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/factory.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
#ifndef PACKAGE_SOUND_DIR
#define PACKAGE_SOUND_DIR "."
#define PACKAGE_SOUND_DIR "."
#endif
#ifndef PACKAGE_RING_DIR
#define PACKAGE_RING_DIR "."
#define PACKAGE_RING_DIR "."
#endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#define PACKAGE_DATA_DIR "."
#endif
extern LinphoneCore *_linphone_core_new_with_config(LinphoneCoreCbs *cbs, struct _LpConfig *config, void *userdata);
......
......@@ -23,24 +23,25 @@
*/
#include "linphone/core.h"
#include "private.h"
#include "linphone/lpconfig.h"
#ifdef SQLITE_STORAGE_ENABLED
#ifndef _WIN32
#if !defined(__ANDROID__) && !defined(__QNXNTO__)
# include <langinfo.h>
# include <iconv.h>
# include <string.h>
#endif
#ifndef _WIN32
#if !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif
#else
#include <Windows.h>
#include <Windows.h>
#endif
#define MAX_PATH_SIZE 1024
#include "sqlite3.h"
#include "sqlite3.h"
#endif
#include "c-wrapper/c-wrapper.h"
const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
const char *str=NULL;
switch(ss){
......@@ -1258,13 +1259,13 @@ static bool_t linphone_update_friends_table(sqlite3* db) {
int database_user_version = -1;
char *errmsg = NULL;
if (sqlite3_prepare_v2(db, "PRAGMA user_version;", -1, &stmt_version, NULL) == SQLITE_OK) {
while(sqlite3_step(stmt_version) == SQLITE_ROW) {
database_user_version = sqlite3_column_int(stmt_version, 0);
if (sqlite3_prepare_v2(db, "PRAGMA user_version;", -1, &stmt_version, NULL) == SQLITE_OK) {
while(sqlite3_step(stmt_version) == SQLITE_ROW) {
database_user_version = sqlite3_column_int(stmt_version, 0);
ms_debug("friends database user version = %i", database_user_version);
}
}
sqlite3_finalize(stmt_version);
sqlite3_finalize(stmt_version);
if (database_user_version != 3100) { // Linphone 3.10.0
int ret = sqlite3_exec(db,
......
......@@ -17,10 +17,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <bctoolbox/crypto.h>
#include "linphone/core.h"
#include "private.h"
#include <bctoolbox/crypto.h>
#include "c-wrapper/c-wrapper.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneFriendListCbs);
......@@ -461,14 +462,14 @@ const LinphoneAddress * _linphone_friend_list_get_rls_address(const LinphoneFrie
const char* rls_uri = lp_config_get_string(list->lc->config, "sip", "rls_uri", NULL);
if (list->lc->default_rls_addr)
linphone_address_unref(list->lc->default_rls_addr);
list->lc->default_rls_addr=NULL;
if (rls_uri) {
/*to make sure changes in config are used if any*/
list->lc->default_rls_addr = linphone_address_new(rls_uri);
}
return list->lc->default_rls_addr;
}
else
......@@ -476,7 +477,7 @@ const LinphoneAddress * _linphone_friend_list_get_rls_address(const LinphoneFrie
}
void linphone_friend_list_set_rls_address(LinphoneFriendList *list, const LinphoneAddress *rls_addr){
LinphoneAddress *new_rls_addr = rls_addr ? linphone_address_clone(rls_addr) : NULL;
if (list->rls_addr){
linphone_address_unref(list->rls_addr);
}
......@@ -874,14 +875,14 @@ void linphone_friend_list_update_subscriptions(LinphoneFriendList *list){
const LinphoneAddress *address = _linphone_friend_list_get_rls_address(list);
bool_t only_when_registered = FALSE;
bool_t should_send_list_subscribe = FALSE;
if (list->lc){
if (address)
cfg = linphone_core_lookup_known_proxy(list->lc, address);
only_when_registered = linphone_core_should_subscribe_friends_only_when_registered(list->lc);
should_send_list_subscribe = (!only_when_registered || !cfg || cfg->state == LinphoneRegistrationOk);
}
if (address != NULL) {
if (list->enable_subscriptions) {
if (should_send_list_subscribe){
......@@ -1008,7 +1009,7 @@ LinphoneCore* linphone_friend_list_get_core(const LinphoneFriendList *list) {
static LinphoneStatus linphone_friend_list_import_friends_from_vcard4(LinphoneFriendList *list, bctbx_list_t *vcards) {
bctbx_list_t *vcards_iterator = NULL;
int count = 0;
if (!linphone_core_vcard_supported()) {
ms_error("vCard support wasn't enabled at compilation time");
return -1;
......@@ -1017,9 +1018,9 @@ static LinphoneStatus linphone_friend_list_import_friends_from_vcard4(LinphoneFr
ms_error("Can't import into a NULL list");
return -1;
}
vcards_iterator = vcards;
while (vcards_iterator != NULL && bctbx_list_get_data(vcards_iterator) != NULL) {
LinphoneVcard *vcard = (LinphoneVcard *)bctbx_list_get_data(vcards_iterator);
LinphoneFriend *lf = linphone_friend_new_from_vcard(vcard);
......@@ -1036,7 +1037,7 @@ static LinphoneStatus linphone_friend_list_import_friends_from_vcard4(LinphoneFr
bctbx_list_free(vcards);
linphone_core_store_friends_list_in_db(list->lc, list);
return count;
}
LinphoneStatus linphone_friend_list_import_friends_from_vcard4_file(LinphoneFriendList *list, const char *vcard_file) {
bctbx_list_t *vcards = NULL;
......@@ -1115,7 +1116,7 @@ void linphone_friend_list_enable_subscriptions(LinphoneFriendList *list, bool_t
} else {
linphone_friend_list_close_subscriptions(list);
}
}
}
......
......@@ -18,9 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include "linphone/im_encryption_engine.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneImEncryptionEngineCbs);
BELLE_SIP_INSTANCIATE_VPTR(LinphoneImEncryptionEngineCbs, belle_sip_object_t,
......
......@@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneImNotifPolicy);
......@@ -30,7 +30,6 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneImNotifPolicy, belle_sip_object_t,
FALSE
);
static void load_im_notif_policy_from_config(LinphoneImNotifPolicy *policy) {
bctbx_list_t *default_list = bctbx_list_append(NULL, (void *)"all");
bctbx_list_t *values = lp_config_get_string_list(policy->lc->config, "sip", "im_notif_policy", default_list);
......
......@@ -22,11 +22,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphone/core.h"
#include "private.h"
#include "linphone/lpconfig.h"
#include "c-wrapper/c-wrapper.h"
struct _LinphoneInfoMessage{
belle_sip_object_t base;
......
......@@ -21,8 +21,8 @@
*/
#include "linphone/tunnel.h"
#include "private.h"
#include "c-wrapper/c-wrapper.h"
struct _LinphoneTunnelConfig {
belle_sip_object_t base;
......@@ -139,6 +139,3 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneTunnelConfig, belle_sip_object_t,
NULL, // marshal
FALSE
);
......@@ -24,7 +24,6 @@
#define MAX_LEN 16384
#include "private.h"
#include "bctoolbox/vfs.h"
#include "belle-sip/object.h"
#include "xml2lpc.h"
......@@ -61,6 +60,8 @@
#include "linphone/lpconfig.h"
#include "lpc2xml.h"
#include "c-wrapper/c-wrapper.h"
typedef struct _LpItem{
char *key;
char *value;
......
......@@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "private.h"
#include "linphone/lpconfig.h"
#include "linphone/wrapper_utils.h"
#include "mediastreamer2/mediastream.h"
......@@ -59,6 +58,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "nat/stun-client.h"
#include "utils/payload-type-handler.h"
#include "c-wrapper/c-wrapper.h"
void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc){
const bctbx_list_t *elem;
int maxbw=LinphonePrivate::PayloadTypeHandler::getMinBandwidth(linphone_core_get_download_bandwidth(lc),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment