Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
437f4366
Commit
437f4366
authored
Sep 25, 2017
by
Ronan
Browse files
feat(c-wrapper): now belle-sip types are declared in this file
parent
96f21ef1
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
88 additions
and
77 deletions
+88
-77
coreapi/account_creator.c
coreapi/account_creator.c
+4
-2
coreapi/account_creator_service.c
coreapi/account_creator_service.c
+2
-1
coreapi/authentication.c
coreapi/authentication.c
+2
-1
coreapi/buffer.c
coreapi/buffer.c
+1
-2
coreapi/call_log.c
coreapi/call_log.c
+12
-11
coreapi/conference.cc
coreapi/conference.cc
+10
-6
coreapi/contact_providers_priv.h
coreapi/contact_providers_priv.h
+2
-1
coreapi/contactprovider.c
coreapi/contactprovider.c
+3
-2
coreapi/content.c
coreapi/content.c
+1
-2
coreapi/error_info.c
coreapi/error_info.c
+6
-7
coreapi/event.c
coreapi/event.c
+2
-1
coreapi/factory.c
coreapi/factory.c
+5
-4
coreapi/friend.c
coreapi/friend.c
+14
-13
coreapi/friendlist.c
coreapi/friendlist.c
+14
-13
coreapi/im_encryption_engine.c
coreapi/im_encryption_engine.c
+2
-1
coreapi/im_notif_policy.c
coreapi/im_notif_policy.c
+1
-2
coreapi/info.c
coreapi/info.c
+2
-2
coreapi/linphone_tunnel_config.c
coreapi/linphone_tunnel_config.c
+1
-4
coreapi/lpconfig.c
coreapi/lpconfig.c
+2
-1
coreapi/misc.c
coreapi/misc.c
+2
-1
No files found.
coreapi/account_creator.c
View file @
437f4366
...
...
@@ -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>
...
...
coreapi/account_creator_service.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/authentication.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/buffer.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/call_log.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/conference.cc
View file @
437f4366
...
...
@@ -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
;
...
...
coreapi/contact_providers_priv.h
View file @
437f4366
...
...
@@ -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
{
...
...
coreapi/contactprovider.c
View file @
437f4366
...
...
@@ -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 *
...
...
coreapi/content.c
View file @
437f4366
...
...
@@ -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
)
{
...
...
coreapi/error_info.c
View file @
437f4366
...
...
@@ -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
);
}
}
...
...
coreapi/event.c
View file @
437f4366
...
...
@@ -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
:
...
...
coreapi/factory.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/friend.c
View file @
437f4366
...
...
@@ -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
,
...
...
coreapi/friendlist.c
View file @
437f4366
...
...
@@ -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
);
}
}
}
...
...
coreapi/im_encryption_engine.c
View file @
437f4366
...
...
@@ -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
,
...
...
coreapi/im_notif_policy.c
View file @
437f4366
...
...
@@ -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
);
...
...
coreapi/info.c
View file @
437f4366
...
...
@@ -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
;
...
...
coreapi/linphone_tunnel_config.c
View file @
437f4366
...
...
@@ -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
);
coreapi/lpconfig.c
View file @
437f4366
...
...
@@ -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
;
...
...
coreapi/misc.c
View file @
437f4366
...
...
@@ -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
),
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment