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
6a90b637
Commit
6a90b637
authored
Aug 10, 2017
by
Benjamin REIS
Browse files
merge master
parent
3e3991ac
Changes
23
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
6a90b637
...
...
@@ -330,6 +330,7 @@ endif()
add_subdirectory
(
include
)
add_subdirectory
(
java
)
add_subdirectory
(
src
)
add_subdirectory
(
coreapi
)
add_subdirectory
(
share
)
if
(
ENABLE_CONSOLE_UI
)
...
...
coreapi/CMakeLists.txt
View file @
6a90b637
...
...
@@ -33,24 +33,7 @@ if(ANDROID)
find_package
(
Support REQUIRED
)
endif
()
set
(
LINPHONE_PRIVATE_HEADER_FILES
../src/conference/conference-info.hxx
../src/conference/conference-listener.h
../src/conference/local-conference-event-handler.h
../src/conference/remote-conference-event-handler.h
../src/cpim/cpim.h
../src/cpim/header/cpim-core-headers.h
../src/cpim/header/cpim-generic-header.h
../src/cpim/header/cpim-header-p.h
../src/cpim/header/cpim-header.h
../src/cpim/message/cpim-message.h
../src/cpim/parser/cpim-grammar.h
../src/cpim/parser/cpim-parser.h
../src/object/object.h
../src/object/singleton.h
../src/utils/general.h
../src/utils/utils.h
list
(
APPEND LINPHONE_PRIVATE_HEADER_FILES
bellesip_sal/sal_impl.h
carddav.h
conference_private.h
...
...
@@ -137,18 +120,8 @@ set(LINPHONE_SOURCE_FILES_C
)
set
(
LINPHONE_SOURCE_FILES_CXX
conference.cc
../src/conference/conference-info.cxx
../src/conference/local-conference-event-handler.cpp
../src/conference/remote-conference-event-handler.cpp
../src/cpim/header/cpim-core-headers.cpp
../src/cpim/header/cpim-generic-header.cpp
../src/cpim/header/cpim-header.cpp
../src/cpim/message/cpim-message.cpp
../src/cpim/parser/cpim-grammar.cpp
../src/cpim/parser/cpim-parser.cpp
../src/utils/utils.cpp
)
set
(
LINPHONE_INCLUDE_DIRS
${
LINPHONE_INCLUDE_DIRS
}
/Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include
)
set
(
LINPHONE_INCLUDE_DIRS
${
LINPHONE_INCLUDE_DIRS
}
)
if
(
ANDROID
)
list
(
APPEND LINPHONE_SOURCE_FILES_CXX linphonecore_jni.cc
)
set_source_files_properties
(
linphonecore_jni.cc PROPERTIES COMPILE_DEFINITIONS
"USE_JAVAH"
)
...
...
@@ -233,7 +206,10 @@ bc_apply_compile_flags(LINPHONE_SOURCE_FILES_CXX STRICT_OPTIONS_CPP STRICT_OPTIO
bc_apply_compile_flags
(
LINPHONE_SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC
)
if
(
ENABLE_STATIC
)
add_library
(
linphone-static STATIC
${
LINPHONE_HEADER_FILES
}
${
LINPHONE_PRIVATE_HEADER_FILES
}
${
LINPHONE_SOURCE_FILES_C
}
${
LINPHONE_SOURCE_FILES_CXX
}
${
LINPHONE_SOURCE_FILES_OBJC
}
)
add_library
(
linphone-static STATIC
${
LINPHONE_HEADER_FILES
}
${
LINPHONE_PRIVATE_HEADER_FILES
}
${
LINPHONE_SOURCE_FILES_C
}
${
LINPHONE_SOURCE_FILES_CXX
}
${
LINPHONE_SOURCE_FILES_OBJC
}
$<TARGET_OBJECTS:linphone-cxx-objects-static>
)
set_target_properties
(
linphone-static PROPERTIES OUTPUT_NAME linphone
)
add_dependencies
(
linphone-static liblinphone-git-version
)
target_include_directories
(
linphone-static PUBLIC
${
LINPHONE_INCLUDE_DIRS
}
)
...
...
@@ -250,7 +226,10 @@ if(ENABLE_STATIC)
)
endif
()
if
(
ENABLE_SHARED
)
add_library
(
linphone SHARED
${
LINPHONE_HEADER_FILES
}
${
LINPHONE_PRIVATE_HEADER_FILES
}
${
LINPHONE_SOURCE_FILES_C
}
${
LINPHONE_SOURCE_FILES_CXX
}
${
LINPHONE_SOURCE_FILES_OBJC
}
)
add_library
(
linphone SHARED
${
LINPHONE_HEADER_FILES
}
${
LINPHONE_PRIVATE_HEADER_FILES
}
${
LINPHONE_SOURCE_FILES_C
}
${
LINPHONE_SOURCE_FILES_CXX
}
${
LINPHONE_SOURCE_FILES_OBJC
}
$<TARGET_OBJECTS:linphone-cxx-objects>
)
if
(
IOS
)
if
(
IOS
)
set
(
MIN_OS
${
LINPHONE_IOS_DEPLOYMENT_TARGET
}
)
...
...
coreapi/misc.c
View file @
6a90b637
...
...
@@ -579,6 +579,7 @@ static const struct addrinfo * find_nat64_addrinfo(const struct addrinfo *ai) {
static
const
struct
addrinfo
*
find_ipv4_addrinfo
(
const
struct
addrinfo
*
ai
)
{
while
(
ai
!=
NULL
)
{
if
(
ai
->
ai_family
==
AF_INET
)
break
;
if
(
ai
->
ai_family
==
AF_INET6
&&
ai
->
ai_flags
&
AI_V4MAPPED
)
break
;
ai
=
ai
->
ai_next
;
}
return
ai
;
...
...
coreapi/private.h
View file @
6a90b637
...
...
@@ -1946,27 +1946,6 @@ SalStreamDir sal_dir_from_call_params_dir(LinphoneMediaDirection cpdir);
/*****************************************************************************
* LINPHONE CONTENT PRIVATE ACCESSORS *
****************************************************************************/
/**
* Get the key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @return The key to encrypt/decrypt the file associated to this content.
*/
LINPHONE_PUBLIC
const
char
*
linphone_content_get_key
(
const
LinphoneContent
*
content
);
/**
* Get the size of key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @return The key size in bytes
*/
size_t
linphone_content_get_key_size
(
const
LinphoneContent
*
content
);
/**
* Set the key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @param[in] key The key to be used to encrypt/decrypt file associated to this content.
* @param[in] keyLength The lengh of the key.
*/
void
linphone_content_set_key
(
LinphoneContent
*
content
,
const
char
*
key
,
const
size_t
keyLength
);
/**
* Get the address of the crypto context associated with a RCS file transfer message if encrypted
...
...
include/linphone/content.h
View file @
6a90b637
...
...
@@ -192,6 +192,28 @@ LINPHONE_PUBLIC LinphoneContent * linphone_content_find_part_by_header(const Lin
*/
LINPHONE_PUBLIC
const
char
*
linphone_content_get_custom_header
(
const
LinphoneContent
*
content
,
const
char
*
header_name
);
/**
* Get the key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @return The key to encrypt/decrypt the file associated to this content.
*/
LINPHONE_PUBLIC
const
char
*
linphone_content_get_key
(
const
LinphoneContent
*
content
);
/**
* Get the size of key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @return The key size in bytes
*/
LINPHONE_PUBLIC
size_t
linphone_content_get_key_size
(
const
LinphoneContent
*
content
);
/**
* Set the key associated with a RCS file transfer message if encrypted
* @param[in] content LinphoneContent object.
* @param[in] key The key to be used to encrypt/decrypt file associated to this content.
* @param[in] keyLength The lengh of the key.
*/
LINPHONE_PUBLIC
void
linphone_content_set_key
(
LinphoneContent
*
content
,
const
char
*
key
,
const
size_t
keyLength
);
/**
* @}
*/
...
...
include/sal/sal.h
View file @
6a90b637
...
...
@@ -346,7 +346,7 @@ int sal_media_description_get_nb_active_streams(const SalMediaDescription *md);
struct
SalOpBase
;
typedef
void
(
*
SalOpReleaseCb
)(
struct
SalOpBase
*
op
);
/*this structure must be at the first byte of the SalOp structure defined by implementors*/
typedef
struct
SalOpBase
{
Sal
*
root
;
...
...
@@ -658,7 +658,7 @@ void sal_verify_server_certificates(Sal *ctx, bool_t verify);
void
sal_verify_server_cn
(
Sal
*
ctx
,
bool_t
verify
);
void
sal_set_ssl_config
(
Sal
*
ctx
,
void
*
ssl_config
);
LINPHONE_PUBLIC
void
sal_set_uuid
(
Sal
*
ctx
,
const
char
*
uuid
);
int
sal_create_uuid
(
Sal
*
ctx
,
char
*
uuid
,
size_t
len
);
LINPHONE_PUBLIC
int
sal_create_uuid
(
Sal
*
ctx
,
char
*
uuid
,
size_t
len
);
int
sal_generate_uuid
(
char
*
uuid
,
size_t
len
);
LINPHONE_PUBLIC
void
sal_enable_test_features
(
Sal
*
ctx
,
bool_t
enabled
);
void
sal_use_no_initial_route
(
Sal
*
ctx
,
bool_t
enabled
);
...
...
@@ -963,5 +963,3 @@ int sal_get_http_proxy_port(const Sal *sal);
#endif
#endif
src/CMakeLists.txt
0 → 100644
View file @
6a90b637
############################################################################
# CMakeLists.txt
# Copyright (C) 2017 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.
#
############################################################################
set
(
LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
conference/conference-info.hxx
conference/conference-listener.h
conference/local-conference-event-handler.h
conference/remote-conference-event-handler.h
cpim/cpim.h
cpim/header/cpim-core-headers.h
cpim/header/cpim-generic-header.h
cpim/header/cpim-header-p.h
cpim/header/cpim-header.h
cpim/message/cpim-message.h
cpim/parser/cpim-grammar.h
cpim/parser/cpim-parser.h
object/object.h
object/object-p.h
object/singleton.h
utils/general.h
utils/utils.h
)
set
(
LINPHONE_CXX_OBJECTS_SOURCE_FILES
conference/conference-info.cxx
conference/local-conference-event-handler.cpp
conference/remote-conference-event-handler.cpp
cpim/header/cpim-core-headers.cpp
cpim/header/cpim-generic-header.cpp
cpim/header/cpim-header.cpp
cpim/message/cpim-message.cpp
cpim/parser/cpim-grammar.cpp
cpim/parser/cpim-parser.cpp
object/object.cpp
utils/utils.cpp
)
set
(
LINPHONE_CXX_OBJECTS_DEFINITIONS
"-DLIBLINPHONE_EXPORTS"
)
set
(
LINPHONE_CXX_OBJECTS_INCLUDE_DIRS
${
BELR_INCLUDE_DIRS
}
/Users/reisbenjamin/xsd-4.0.0-i686-macosx/libxsd /usr/local/Cellar/xerces-c/3.1.4/include
)
set
(
LINPHONE_PRIVATE_HEADER_FILES
)
foreach
(
header
${
LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
}
)
list
(
APPEND LINPHONE_PRIVATE_HEADER_FILES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
header
}
"
)
endforeach
()
set
(
LINPHONE_PRIVATE_HEADER_FILES
${
LINPHONE_PRIVATE_HEADER_FILES
}
PARENT_SCOPE
)
bc_apply_compile_flags
(
LINPHONE_CXX_OBJECTS_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX
)
if
(
ENABLE_STATIC
)
add_library
(
linphone-cxx-objects-static OBJECT
${
LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
}
${
LINPHONE_CXX_OBJECTS_SOURCE_FILES
}
)
target_compile_definitions
(
linphone-cxx-objects-static PRIVATE
${
LINPHONE_CXX_OBJECTS_DEFINITIONS
}
)
target_include_directories
(
linphone-cxx-objects-static PRIVATE
${
LINPHONE_CXX_OBJECTS_INCLUDE_DIRS
}
${
LINPHONE_INCLUDE_DIRS
}
)
endif
()
if
(
ENABLE_SHARED
)
add_library
(
linphone-cxx-objects OBJECT
${
LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
}
${
LINPHONE_CXX_OBJECTS_SOURCE_FILES
}
)
target_compile_definitions
(
linphone-cxx-objects PRIVATE
${
LINPHONE_CXX_OBJECTS_DEFINITIONS
}
)
target_include_directories
(
linphone-cxx-objects PRIVATE
${
LINPHONE_CXX_OBJECTS_INCLUDE_DIRS
}
${
LINPHONE_INCLUDE_DIRS
}
)
target_compile_options
(
linphone-cxx-objects PRIVATE
"-fPIC"
)
endif
()
src/conference/local-conference-event-handler.cpp
View file @
6a90b637
...
...
@@ -19,6 +19,7 @@
#include "local-conference-event-handler.h"
#include "conference-info.hxx"
#include "private.h"
#include "object/object-p.h"
using
namespace
std
;
using
namespace
conference_info
;
...
...
src/conference/remote-conference-event-handler.cpp
View file @
6a90b637
...
...
@@ -19,6 +19,7 @@
#include "remote-conference-event-handler.h"
#include "conference-info.hxx"
#include "private.h"
#include "object/object-p.h"
using
namespace
std
;
using
namespace
conference_info
;
...
...
src/cpim/header/cpim-core-headers.h
View file @
6a90b637
...
...
@@ -24,7 +24,7 @@
// =============================================================================
#define MAKE_CORE_HEADER(CLASS_PREFIX, NAME) \
class CLASS_PREFIX ## Header : public CoreHeader { \
class
LINPHONE_PUBLIC
CLASS_PREFIX ## Header : public CoreHeader { \
public: \
CLASS_PREFIX ## Header() = default; \
inline std::string getName() const override { \
...
...
@@ -43,7 +43,7 @@ namespace LinphonePrivate {
// Generic core header.
// -------------------------------------------------------------------------
class
CoreHeader
:
public
Header
{
class
LINPHONE_PUBLIC
CoreHeader
:
public
Header
{
friend
class
HeaderNode
;
public:
...
...
@@ -79,7 +79,7 @@ namespace LinphonePrivate {
class
SubjectHeaderPrivate
;
class
SubjectHeader
:
public
CoreHeader
{
class
LINPHONE_PUBLIC
SubjectHeader
:
public
CoreHeader
{
friend
class
HeaderNode
;
public:
...
...
src/cpim/header/cpim-generic-header.cpp
View file @
6a90b637
...
...
@@ -32,8 +32,10 @@ using namespace LinphonePrivate;
class
Cpim
::
GenericHeaderPrivate
:
public
HeaderPrivate
{
public:
GenericHeaderPrivate
()
:
parameters
(
make_shared
<
list
<
pair
<
string
,
string
>
>
>
())
{}
string
name
;
shared_ptr
<
list
<
pair
<
string
,
string
>
>
>
parameters
=
make_shared
<
list
<
pair
<
string
,
string
>
>
>
()
;
shared_ptr
<
list
<
pair
<
string
,
string
>
>
>
parameters
;
};
Cpim
::
GenericHeader
::
GenericHeader
()
:
Header
(
*
new
GenericHeaderPrivate
)
{}
...
...
src/cpim/header/cpim-generic-header.h
View file @
6a90b637
...
...
@@ -31,7 +31,7 @@ namespace LinphonePrivate {
class
GenericHeaderPrivate
;
class
HeaderNode
;
class
GenericHeader
:
public
Header
{
class
LINPHONE_PUBLIC
GenericHeader
:
public
Header
{
friend
class
HeaderNode
;
public:
...
...
src/cpim/header/cpim-header-p.h
View file @
6a90b637
...
...
@@ -20,6 +20,7 @@
#define _CPIM_HEADER_P_H_
#include "cpim-header.h"
#include "object/object-p.h"
// =============================================================================
...
...
src/cpim/header/cpim-header.h
View file @
6a90b637
...
...
@@ -29,7 +29,7 @@ namespace LinphonePrivate {
namespace
Cpim
{
class
HeaderPrivate
;
class
Header
:
public
Object
{
class
LINPHONE_PUBLIC
Header
:
public
Object
{
public:
virtual
~
Header
()
=
default
;
...
...
src/cpim/message/cpim-message.cpp
View file @
6a90b637
...
...
@@ -19,6 +19,7 @@
#include <algorithm>
#include "cpim/parser/cpim-parser.h"
#include "object/object-p.h"
#include "utils/utils.h"
#include "cpim-message.h"
...
...
src/cpim/message/cpim-message.h
View file @
6a90b637
...
...
@@ -28,7 +28,7 @@ namespace LinphonePrivate {
namespace
Cpim
{
class
MessagePrivate
;
class
Message
:
public
Object
{
class
LINPHONE_PUBLIC
Message
:
public
Object
{
public:
Message
();
...
...
src/cpim/parser/cpim-parser.cpp
View file @
6a90b637
...
...
@@ -24,6 +24,7 @@
#include "linphone/core.h"
#include "cpim-grammar.h"
#include "object/object-p.h"
#include "utils/utils.h"
#include "cpim-parser.h"
...
...
src/object/object-p.h
0 → 100644
View file @
6a90b637
/*
* object-p.h
* Copyright (C) 2017 Belledonne Communications SARL
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef _OBJECT_P_H_
#define _OBJECT_P_H_
#include "utils/general.h"
// =============================================================================
namespace
LinphonePrivate
{
class
Object
;
class
ObjectPrivate
{
public:
virtual
~
ObjectPrivate
()
=
default
;
protected:
Object
*
mPublic
=
nullptr
;
private:
L_DECLARE_PUBLIC
(
Object
);
};
}
#endif // ifndef _OBJECT_P_H_
src/object/object.cpp
0 → 100644
View file @
6a90b637
/*
* object.cpp
* Copyright (C) 2017 Belledonne Communications SARL
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include "object-p.h"
#include "object.h"
using
namespace
LinphonePrivate
;
// =============================================================================
Object
::~
Object
()
{
delete
mPrivate
;
}
Object
::
Object
(
ObjectPrivate
&
p
)
:
mPrivate
(
&
p
)
{
mPrivate
->
mPublic
=
this
;
}
src/object/object.h
View file @
6a90b637
...
...
@@ -24,29 +24,14 @@
// =============================================================================
namespace
LinphonePrivate
{
class
Object
;
class
Object
Private
;
class
ObjectPrivate
{
class
LINPHONE_PUBLIC
Object
{
public:
virtual
~
Object
Private
()
=
default
;
virtual
~
Object
()
;
protected:
Object
*
mPublic
=
nullptr
;
private:
L_DECLARE_PUBLIC
(
Object
);
};
class
Object
{
public:
virtual
~
Object
()
{
delete
mPrivate
;
}
protected:
explicit
Object
(
ObjectPrivate
&
p
)
:
mPrivate
(
&
p
)
{
mPrivate
->
mPublic
=
this
;
}
explicit
Object
(
ObjectPrivate
&
p
);
ObjectPrivate
*
mPrivate
=
nullptr
;
...
...
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