forked from mirrors/linphone-iphone
feat(c-wrapper): now belle-sip types are declared in this file
This commit is contained in:
parent
96f21ef1f2
commit
437f43665e
29 changed files with 197 additions and 182 deletions
|
|
@ -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,12 +18,11 @@ 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(LinphoneErrorInfo);
|
||||
|
||||
|
||||
|
||||
static void linphone_error_info_reset(LinphoneErrorInfo *ei);
|
||||
|
||||
static void error_info_destroy(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,11 +17,12 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "private.h"
|
||||
|
||||
#include <bctoolbox/crypto.h>
|
||||
|
||||
#include "linphone/core.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneFriendListCbs);
|
||||
|
||||
BELLE_SIP_INSTANCIATE_VPTR(LinphoneFriendListCbs, belle_sip_object_t,
|
||||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
static LinphoneNatPolicy * _linphone_nat_policy_new_with_ref(LinphoneCore *lc, const char *ref) {
|
||||
LinphoneNatPolicy *policy = belle_sip_object_new(LinphoneNatPolicy);
|
||||
|
|
@ -274,7 +274,7 @@ LinphoneNatPolicy * linphone_config_create_nat_policy_from_section(const Linphon
|
|||
policy = _linphone_nat_policy_new_with_ref(NULL, config_ref);
|
||||
else
|
||||
policy = linphone_nat_policy_new(NULL);
|
||||
|
||||
|
||||
if (server != NULL) linphone_nat_policy_set_stun_server(policy, server);
|
||||
if (username != NULL) linphone_nat_policy_set_stun_server_username(policy, username);
|
||||
if (l != NULL) {
|
||||
|
|
@ -298,7 +298,7 @@ LinphoneNatPolicy * linphone_core_create_nat_policy_from_config(LinphoneCore *lc
|
|||
char *section;
|
||||
int index;
|
||||
bool_t finished = FALSE;
|
||||
|
||||
|
||||
for (index = 0; finished != TRUE; index++) {
|
||||
section = belle_sip_strdup_printf("nat_policy_%i", index);
|
||||
if (lp_config_has_section(config, section)) {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include <string.h>
|
||||
#include <ortp/payloadtype.h>
|
||||
#include "linphone/payload_type.h"
|
||||
#include "private.h"
|
||||
|
||||
#include "linphone/payload_type.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "utils/payload-type-handler.h"
|
||||
|
||||
struct _LinphonePayloadType {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ 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 "c-wrapper/c-wrapper.h"
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphonePlayer);
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ static void call_player_close(LinphonePlayer *player){
|
|||
if (!call_player_check_state(player,TRUE)) return;
|
||||
AudioStream *astream = reinterpret_cast<AudioStream *>(linphone_call_get_stream(call, LinphoneStreamTypeAudio));
|
||||
audio_stream_close_remote_play(astream);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void on_call_destroy(void *obj, belle_sip_object_t *call_being_destroyed){
|
||||
|
|
|
|||
|
|
@ -18,16 +18,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "private.h"
|
||||
#include "linphone/lpconfig.h"
|
||||
#include "linphone/presence.h"
|
||||
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
|
||||
extern const char *__policy_enum_to_str(LinphoneSubscribePolicy pol);
|
||||
|
||||
|
||||
|
||||
struct _LinphonePresenceNote {
|
||||
belle_sip_object_t base;
|
||||
void *user_data;
|
||||
|
|
|
|||
|
|
@ -1602,76 +1602,6 @@ BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneVideoActivationPolicy);
|
|||
|
||||
LINPHONE_PUBLIC LinphoneVideoActivationPolicy *linphone_video_activation_policy_new(void);
|
||||
|
||||
|
||||
/** Belle Sip-based objects need unique ids
|
||||
*/
|
||||
|
||||
BELLE_SIP_DECLARE_TYPES_BEGIN(linphone, 10000)
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreator),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorService),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAddress),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAuthInfo),
|
||||
BELLE_SIP_TYPE_ID(LinphoneBuffer),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCall),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallLog),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallParams),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallStats),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatMessage),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatMessageCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatMessageEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatRoom),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatRoomCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConference),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConferenceEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConferenceParams),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConferenceParticipantEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactProvider),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactSearch),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCore),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCoreCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneErrorInfo),
|
||||
BELLE_SIP_TYPE_ID(LinphoneEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneEventLog),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFactory),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriend),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriendList),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriendListCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImEncryptionEngine),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImEncryptionEngineCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImNotifPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphoneInfoMessage),
|
||||
BELLE_SIP_TYPE_ID(LinphoneLDAPContactProvider),
|
||||
BELLE_SIP_TYPE_ID(LinphoneLDAPContactSearch),
|
||||
BELLE_SIP_TYPE_ID(LinphoneNatPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphoneParticipant),
|
||||
BELLE_SIP_TYPE_ID(LinphonePayloadType),
|
||||
BELLE_SIP_TYPE_ID(LinphonePlayer),
|
||||
BELLE_SIP_TYPE_ID(LinphonePlayerCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceActivity),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceModel),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceNote),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresencePerson),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceService),
|
||||
BELLE_SIP_TYPE_ID(LinphoneProxyConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneRange),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTransports),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTunnel),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTunnelConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVcard),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVideoActivationPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVideoDefinition),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcRequest),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcRequestCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcSession)
|
||||
BELLE_SIP_DECLARE_TYPES_END
|
||||
|
||||
|
||||
|
||||
void linphone_core_notify_global_state_changed(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -17,15 +17,18 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "vcard_private.h"
|
||||
#include "belcard/belcard.hpp"
|
||||
#include "belcard/belcard_parser.hpp"
|
||||
#include "sal/sal.h"
|
||||
#include <bctoolbox/crypto.h>
|
||||
#include "private.h"
|
||||
|
||||
#include <belcard/belcard_parser.hpp>
|
||||
#include <belcard/belcard.hpp>
|
||||
|
||||
#include "linphone/factory.h"
|
||||
#include "linphone/wrapper_utils.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "sal/sal.h"
|
||||
#include "vcard_private.h"
|
||||
|
||||
#define VCARD_MD5_HASH_SIZE 16
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "linphone/factory.h"
|
||||
#include "linphone/video_definition.h"
|
||||
|
||||
#include "private.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
|
||||
static void linphone_video_definition_destroy(LinphoneVideoDefinition *vdef) {
|
||||
if (vdef->name) bctbx_free(vdef->name);
|
||||
|
|
|
|||
|
|
@ -17,14 +17,13 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "linphone/core.h"
|
||||
#include "private.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlwriter.h>
|
||||
|
||||
#include "linphone/core.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneXmlRpcRequestCbs);
|
||||
|
||||
|
|
@ -423,4 +422,3 @@ void linphone_xml_rpc_session_release(LinphoneXmlRpcSession *session){
|
|||
session->released = TRUE;
|
||||
belle_sip_object_unref(session);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,20 +23,96 @@
|
|||
|
||||
#include "internal/c-tools.h"
|
||||
|
||||
// =============================================================================
|
||||
// Declare exported C types.
|
||||
// =============================================================================
|
||||
|
||||
L_REGISTER_TYPE(Address, Address);
|
||||
L_REGISTER_TYPE(Call, Call);
|
||||
L_REGISTER_TYPE(CallEvent, CallEvent);
|
||||
L_REGISTER_TYPE(ChatMessage, ChatMessage);
|
||||
L_REGISTER_TYPE(ChatMessageEvent, ChatMessageEvent);
|
||||
L_REGISTER_TYPE(ChatRoom, ChatRoom);
|
||||
L_REGISTER_TYPE(ConferenceEvent, ConferenceEvent);
|
||||
L_REGISTER_TYPE(ConferenceParticipantEvent, ConferenceParticipantEvent);
|
||||
L_REGISTER_TYPE(EventLog, EventLog);
|
||||
L_REGISTER_TYPE(MediaSessionParams, CallParams);
|
||||
L_REGISTER_TYPE(Participant, Participant);
|
||||
#define L_REGISTER_TYPES(F) \
|
||||
F(Address, Address) \
|
||||
F(Call, Call) \
|
||||
F(CallEvent, CallEvent) \
|
||||
F(ChatMessage, ChatMessage) \
|
||||
F(ChatMessageEvent, ChatMessageEvent) \
|
||||
F(ChatRoom, ChatRoom) \
|
||||
F(ConferenceEvent, ConferenceEvent) \
|
||||
F(ConferenceParticipantEvent, ConferenceParticipantEvent) \
|
||||
F(EventLog, EventLog) \
|
||||
F(MediaSessionParams, CallParams) \
|
||||
F(Participant, Participant)
|
||||
|
||||
L_REGISTER_SUBTYPE(ChatRoom, ClientGroupChatRoom);
|
||||
#define L_REGISTER_SUBTYPES(F) \
|
||||
F(ChatRoom, ClientGroupChatRoom)
|
||||
|
||||
// =============================================================================
|
||||
// Register belle-sip ID.
|
||||
// =============================================================================
|
||||
|
||||
#define L_REGISTER_ID(CPP_TYPE, C_TYPE) BELLE_SIP_TYPE_ID(Linphone ## C_TYPE),
|
||||
|
||||
BELLE_SIP_DECLARE_TYPES_BEGIN(linphone, 10000)
|
||||
L_REGISTER_TYPES(L_REGISTER_ID)
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreator),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAccountCreatorService),
|
||||
BELLE_SIP_TYPE_ID(LinphoneAuthInfo),
|
||||
BELLE_SIP_TYPE_ID(LinphoneBuffer),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallLog),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCallStats),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatMessageCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneChatRoomCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConference),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConferenceParams),
|
||||
BELLE_SIP_TYPE_ID(LinphoneConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactProvider),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContactSearch),
|
||||
BELLE_SIP_TYPE_ID(LinphoneContent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCore),
|
||||
BELLE_SIP_TYPE_ID(LinphoneCoreCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneErrorInfo),
|
||||
BELLE_SIP_TYPE_ID(LinphoneEvent),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFactory),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriend),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriendList),
|
||||
BELLE_SIP_TYPE_ID(LinphoneFriendListCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImEncryptionEngine),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImEncryptionEngineCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneImNotifPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphoneInfoMessage),
|
||||
BELLE_SIP_TYPE_ID(LinphoneLDAPContactProvider),
|
||||
BELLE_SIP_TYPE_ID(LinphoneLDAPContactSearch),
|
||||
BELLE_SIP_TYPE_ID(LinphoneNatPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphonePayloadType),
|
||||
BELLE_SIP_TYPE_ID(LinphonePlayer),
|
||||
BELLE_SIP_TYPE_ID(LinphonePlayerCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceActivity),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceModel),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceNote),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresencePerson),
|
||||
BELLE_SIP_TYPE_ID(LinphonePresenceService),
|
||||
BELLE_SIP_TYPE_ID(LinphoneProxyConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneRange),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTransports),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTunnel),
|
||||
BELLE_SIP_TYPE_ID(LinphoneTunnelConfig),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVcard),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVideoActivationPolicy),
|
||||
BELLE_SIP_TYPE_ID(LinphoneVideoDefinition),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcRequest),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcRequestCbs),
|
||||
BELLE_SIP_TYPE_ID(LinphoneXmlRpcSession)
|
||||
BELLE_SIP_DECLARE_TYPES_END
|
||||
|
||||
#undef L_REGISTER_ID
|
||||
|
||||
// =============================================================================
|
||||
// Register C types.
|
||||
// =============================================================================
|
||||
|
||||
L_REGISTER_TYPES(L_REGISTER_TYPE);
|
||||
L_REGISTER_SUBTYPES(L_REGISTER_SUBTYPE);
|
||||
|
||||
#undef L_REGISTER_SUBTYPES
|
||||
#undef L_REGISTER_TYPES
|
||||
|
||||
#endif // ifndef _C_WRAPPER_H_
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue