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
71149521
Commit
71149521
authored
Apr 12, 2018
by
Ghislain MARY
Browse files
Revert "Revert "Merge branch 'dev_content_cpp' into dev_refactor_cpp""
This reverts commit
2686dca6
.
parent
bc753643
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
99 additions
and
305 deletions
+99
-305
coreapi/CMakeLists.txt
coreapi/CMakeLists.txt
+0
-1
coreapi/Makefile.am
coreapi/Makefile.am
+0
-1
coreapi/bellesip_sal/sal_impl.c
coreapi/bellesip_sal/sal_impl.c
+32
-0
coreapi/callbacks.c
coreapi/callbacks.c
+2
-1
coreapi/content.c
coreapi/content.c
+0
-243
coreapi/friendlist.c
coreapi/friendlist.c
+2
-1
coreapi/info.c
coreapi/info.c
+1
-0
coreapi/lime.c
coreapi/lime.c
+7
-2
coreapi/linphonecore.c
coreapi/linphonecore.c
+3
-1
coreapi/private_structs.h
coreapi/private_structs.h
+0
-11
coreapi/proxy.c
coreapi/proxy.c
+1
-0
coreapi/quality_reporting.c
coreapi/quality_reporting.c
+2
-0
include/CMakeLists.txt
include/CMakeLists.txt
+1
-1
include/linphone/Makefile.am
include/linphone/Makefile.am
+0
-1
include/linphone/api/c-api.h
include/linphone/api/c-api.h
+4
-3
include/linphone/api/c-chat-room.h
include/linphone/api/c-chat-room.h
+1
-1
include/linphone/api/c-content.h
include/linphone/api/c-content.h
+37
-31
include/linphone/api/c-types.h
include/linphone/api/c-types.h
+6
-0
include/linphone/core.h
include/linphone/core.h
+0
-1
include/linphone/types.h
include/linphone/types.h
+0
-6
No files found.
coreapi/CMakeLists.txt
View file @
71149521
...
...
@@ -64,7 +64,6 @@ set(LINPHONE_SOURCE_FILES_C
carddav.c
chat.c
contactprovider.c
content.c
dial_plan.c
dict.c
ec-calibrator.c
...
...
coreapi/Makefile.am
View file @
71149521
...
...
@@ -39,7 +39,6 @@ liblinphone_la_SOURCES=\
chat_file_transfer.c
\
conference.cc conference_private.h
\
contactprovider.c contact_providers_priv.h
\
content.c
\
dial_plan.c
\
dict.c
\
ec-calibrator.c
\
...
...
coreapi/bellesip_sal/sal_impl.c
View file @
71149521
...
...
@@ -348,6 +348,29 @@ void sal_body_handler_set_subtype(SalBodyHandler *body_handler, const char *subt
belle_sip_header_content_type_set_subtype
(
content_type
,
subtype
);
}
const
belle_sip_list_t
*
sal_body_handler_get_content_type_parameters_names
(
const
SalBodyHandler
*
body_handler
)
{
belle_sip_header_content_type_t
*
content_type
=
BELLE_SIP_HEADER_CONTENT_TYPE
(
sal_body_handler_find_header
(
body_handler
,
"Content-Type"
));
if
(
content_type
!=
NULL
)
{
return
belle_sip_parameters_get_parameter_names
(
BELLE_SIP_PARAMETERS
(
content_type
));
}
return
NULL
;
}
const
char
*
sal_body_handler_get_content_type_parameter
(
const
SalBodyHandler
*
body_handler
,
const
char
*
name
)
{
belle_sip_header_content_type_t
*
content_type
=
BELLE_SIP_HEADER_CONTENT_TYPE
(
sal_body_handler_find_header
(
body_handler
,
"Content-Type"
));
if
(
content_type
!=
NULL
)
{
return
belle_sip_parameters_get_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
name
);
}
return
NULL
;
}
void
sal_body_handler_set_content_type_parameter
(
SalBodyHandler
*
body_handler
,
const
char
*
paramName
,
const
char
*
paramValue
)
{
belle_sip_header_content_type_t
*
content_type
=
BELLE_SIP_HEADER_CONTENT_TYPE
(
sal_body_handler_find_header
(
body_handler
,
"Content-Type"
));
if
(
content_type
!=
NULL
)
{
belle_sip_parameters_set_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
paramName
,
paramValue
);
}
}
const
char
*
sal_body_handler_get_encoding
(
const
SalBodyHandler
*
body_handler
)
{
belle_sip_header_t
*
content_encoding
=
sal_body_handler_find_header
(
body_handler
,
"Content-Encoding"
);
if
(
content_encoding
!=
NULL
)
{
...
...
@@ -396,6 +419,11 @@ SalBodyHandler * sal_body_handler_get_part(const SalBodyHandler *body_handler, i
return
(
SalBodyHandler
*
)
belle_sip_list_nth_data
(
l
,
idx
);
}
const
belle_sip_list_t
*
sal_body_handler_get_parts
(
const
SalBodyHandler
*
body_handler
)
{
if
(
!
sal_body_handler_is_multipart
(
body_handler
))
return
NULL
;
return
belle_sip_multipart_body_handler_get_parts
(
BELLE_SIP_MULTIPART_BODY_HANDLER
(
body_handler
));
}
SalBodyHandler
*
sal_body_handler_find_part_by_header
(
const
SalBodyHandler
*
body_handler
,
const
char
*
header_name
,
const
char
*
header_value
)
{
const
belle_sip_list_t
*
l
=
belle_sip_multipart_body_handler_get_parts
(
BELLE_SIP_MULTIPART_BODY_HANDLER
(
body_handler
));
for
(;
l
!=
NULL
;
l
=
l
->
next
)
{
...
...
@@ -418,3 +446,7 @@ const char * sal_body_handler_get_header(const SalBodyHandler *body_handler, con
}
return
NULL
;
}
const
belle_sip_list_t
*
sal_body_handler_get_headers
(
const
SalBodyHandler
*
body_handler
)
{
return
belle_sip_body_handler_get_headers
(
BELLE_SIP_BODY_HANDLER
(
body_handler
));
}
coreapi/callbacks.c
View file @
71149521
...
...
@@ -17,14 +17,15 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "c-wrapper/internal/c-sal.h"
#include "sal/call-op.h"
#include "sal/message-op.h"
#include "sal/refer-op.h"
#include "linphone/api/c-content.h"
#include "linphone/core.h"
#include "linphone/utils/utils.h"
#include "private.h"
#include "mediastreamer2/mediastream.h"
#include "linphone/lpconfig.h"
...
...
coreapi/content.c
deleted
100644 → 0
View file @
bc753643
/*
linphone
Copyright (C) 2010-2014 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 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.
*/
#include "linphone/core.h"
#include "c-wrapper/c-wrapper.h"
// TODO: From coreapi. Remove me later.
#include "private.h"
static
void
linphone_content_set_sal_body_handler
(
LinphoneContent
*
content
,
SalBodyHandler
*
body_handler
)
{
if
(
content
->
body_handler
!=
NULL
)
{
sal_body_handler_unref
(
content
->
body_handler
);
content
->
body_handler
=
NULL
;
}
content
->
body_handler
=
sal_body_handler_ref
(
body_handler
);
}
static
LinphoneContent
*
linphone_content_new_with_body_handler
(
SalBodyHandler
*
body_handler
)
{
LinphoneContent
*
content
=
belle_sip_object_new
(
LinphoneContent
);
belle_sip_object_ref
(
content
);
content
->
owned_fields
=
TRUE
;
content
->
cryptoContext
=
NULL
;
/* this field is managed externally by encryption/decryption functions so be careful to initialise it to NULL */
if
(
body_handler
==
NULL
)
{
linphone_content_set_sal_body_handler
(
content
,
sal_body_handler_new
());
}
else
{
linphone_content_set_sal_body_handler
(
content
,
body_handler
);
}
return
content
;
}
static
void
linphone_content_destroy
(
LinphoneContent
*
content
)
{
if
(
content
->
owned_fields
==
TRUE
)
{
if
(
content
->
body_handler
)
sal_body_handler_unref
(
content
->
body_handler
);
if
(
content
->
name
)
belle_sip_free
(
content
->
name
);
if
(
content
->
key
)
belle_sip_free
(
content
->
key
);
/* note : crypto context is allocated/destroyed by the encryption function */
}
}
static
void
linphone_content_clone
(
LinphoneContent
*
obj
,
const
LinphoneContent
*
ref
)
{
obj
->
owned_fields
=
TRUE
;
linphone_content_set_sal_body_handler
(
obj
,
sal_body_handler_new
());
if
((
linphone_content_get_type
(
ref
)
!=
NULL
)
||
(
linphone_content_get_subtype
(
ref
)
!=
NULL
))
{
linphone_content_set_type
(
obj
,
linphone_content_get_type
(
ref
));
linphone_content_set_subtype
(
obj
,
linphone_content_get_subtype
(
ref
));
}
if
(
linphone_content_get_encoding
(
ref
)
!=
NULL
)
{
linphone_content_set_encoding
(
obj
,
linphone_content_get_encoding
(
ref
));
}
linphone_content_set_name
(
obj
,
linphone_content_get_name
(
ref
));
linphone_content_set_key
(
obj
,
linphone_content_get_key
(
ref
),
linphone_content_get_key_size
(
ref
));
if
(
linphone_content_get_buffer
(
ref
)
!=
NULL
)
{
linphone_content_set_buffer
(
obj
,
linphone_content_get_buffer
(
ref
),
linphone_content_get_size
(
ref
));
}
else
{
linphone_content_set_size
(
obj
,
linphone_content_get_size
(
ref
));
}
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES
(
LinphoneContent
);
BELLE_SIP_INSTANCIATE_VPTR
(
LinphoneContent
,
belle_sip_object_t
,
(
belle_sip_object_destroy_t
)
linphone_content_destroy
,
(
belle_sip_object_clone_t
)
linphone_content_clone
,
NULL
,
// marshal
TRUE
);
LinphoneContent
*
linphone_core_create_content
(
LinphoneCore
*
lc
)
{
return
linphone_content_new
();
}
LinphoneContent
*
linphone_content_ref
(
LinphoneContent
*
content
)
{
belle_sip_object_ref
(
content
);
return
content
;
}
void
linphone_content_unref
(
LinphoneContent
*
content
)
{
belle_sip_object_unref
(
content
);
}
void
*
linphone_content_get_user_data
(
const
LinphoneContent
*
content
)
{
return
content
->
user_data
;
}
void
linphone_content_set_user_data
(
LinphoneContent
*
content
,
void
*
ud
)
{
content
->
user_data
=
ud
;
}
const
char
*
linphone_content_get_type
(
const
LinphoneContent
*
content
)
{
return
sal_body_handler_get_type
(
content
->
body_handler
);
}
void
linphone_content_set_type
(
LinphoneContent
*
content
,
const
char
*
type
)
{
sal_body_handler_set_type
(
content
->
body_handler
,
type
);
}
const
char
*
linphone_content_get_subtype
(
const
LinphoneContent
*
content
)
{
return
sal_body_handler_get_subtype
(
content
->
body_handler
);
}
void
linphone_content_set_subtype
(
LinphoneContent
*
content
,
const
char
*
subtype
)
{
sal_body_handler_set_subtype
(
content
->
body_handler
,
subtype
);
}
uint8_t
*
linphone_content_get_buffer
(
const
LinphoneContent
*
content
)
{
return
(
uint8_t
*
)
sal_body_handler_get_data
(
content
->
body_handler
);
}
void
linphone_content_set_buffer
(
LinphoneContent
*
content
,
const
uint8_t
*
buffer
,
size_t
size
)
{
void
*
data
;
sal_body_handler_set_size
(
content
->
body_handler
,
size
);
data
=
belle_sip_malloc
(
size
+
1
);
memcpy
(
data
,
buffer
,
size
);
((
char
*
)
data
)[
size
]
=
'\0'
;
sal_body_handler_set_data
(
content
->
body_handler
,
data
);
}
const
char
*
linphone_content_get_string_buffer
(
const
LinphoneContent
*
content
)
{
return
(
const
char
*
)
linphone_content_get_buffer
(
content
);
}
void
linphone_content_set_string_buffer
(
LinphoneContent
*
content
,
const
char
*
buffer
)
{
sal_body_handler_set_size
(
content
->
body_handler
,
strlen
(
buffer
));
sal_body_handler_set_data
(
content
->
body_handler
,
belle_sip_strdup
(
buffer
));
}
size_t
linphone_content_get_size
(
const
LinphoneContent
*
content
)
{
return
sal_body_handler_get_size
(
content
->
body_handler
);
}
void
linphone_content_set_size
(
LinphoneContent
*
content
,
size_t
size
)
{
sal_body_handler_set_size
(
content
->
body_handler
,
size
);
}
const
char
*
linphone_content_get_encoding
(
const
LinphoneContent
*
content
)
{
return
sal_body_handler_get_encoding
(
content
->
body_handler
);
}
void
linphone_content_set_encoding
(
LinphoneContent
*
content
,
const
char
*
encoding
)
{
sal_body_handler_set_encoding
(
content
->
body_handler
,
encoding
);
}
const
char
*
linphone_content_get_name
(
const
LinphoneContent
*
content
)
{
return
content
->
name
;
}
void
linphone_content_set_name
(
LinphoneContent
*
content
,
const
char
*
name
)
{
if
(
content
->
name
!=
NULL
)
{
belle_sip_free
(
content
->
name
);
content
->
name
=
NULL
;
}
if
(
name
!=
NULL
)
{
content
->
name
=
belle_sip_strdup
(
name
);
}
}
size_t
linphone_content_get_key_size
(
const
LinphoneContent
*
content
)
{
return
content
->
keyLength
;
}
const
char
*
linphone_content_get_key
(
const
LinphoneContent
*
content
)
{
return
content
->
key
;
}
void
linphone_content_set_key
(
LinphoneContent
*
content
,
const
char
*
key
,
const
size_t
keyLength
)
{
if
(
content
->
key
!=
NULL
)
{
belle_sip_free
(
content
->
key
);
content
->
key
=
NULL
;
}
if
(
key
!=
NULL
)
{
content
->
key
=
reinterpret_cast
<
char
*>
(
belle_sip_malloc
(
keyLength
+
1
));
memcpy
(
content
->
key
,
key
,
keyLength
);
content
->
key
[
keyLength
]
=
'\0'
;
content
->
keyLength
=
keyLength
;
}
}
/* crypto context is managed(allocated/freed) by the encryption function, so provide the address of field in the private structure */
void
**
linphone_content_get_cryptoContext_address
(
LinphoneContent
*
content
)
{
return
&
(
content
->
cryptoContext
);
}
bool_t
linphone_content_is_multipart
(
const
LinphoneContent
*
content
)
{
return
sal_body_handler_is_multipart
(
content
->
body_handler
);
}
LinphoneContent
*
linphone_content_get_part
(
const
LinphoneContent
*
content
,
int
idx
)
{
SalBodyHandler
*
part_body_handler
;
if
(
!
linphone_content_is_multipart
(
content
))
return
NULL
;
part_body_handler
=
sal_body_handler_get_part
(
content
->
body_handler
,
idx
);
return
linphone_content_from_sal_body_handler
(
part_body_handler
);
}
LinphoneContent
*
linphone_content_find_part_by_header
(
const
LinphoneContent
*
content
,
const
char
*
header_name
,
const
char
*
header_value
)
{
SalBodyHandler
*
part_body_handler
;
if
(
!
linphone_content_is_multipart
(
content
))
return
NULL
;
part_body_handler
=
sal_body_handler_find_part_by_header
(
content
->
body_handler
,
header_name
,
header_value
);
return
linphone_content_from_sal_body_handler
(
part_body_handler
);
}
const
char
*
linphone_content_get_custom_header
(
const
LinphoneContent
*
content
,
const
char
*
header_name
)
{
return
sal_body_handler_get_header
(
content
->
body_handler
,
header_name
);
}
LinphoneContent
*
linphone_content_new
(
void
)
{
return
linphone_content_new_with_body_handler
(
NULL
);
}
LinphoneContent
*
linphone_content_copy
(
const
LinphoneContent
*
ref
)
{
return
(
LinphoneContent
*
)
belle_sip_object_ref
(
belle_sip_object_clone
(
BELLE_SIP_OBJECT
(
ref
)));
}
LinphoneContent
*
linphone_content_from_sal_body_handler
(
SalBodyHandler
*
body_handler
)
{
if
(
body_handler
)
{
return
linphone_content_new_with_body_handler
(
body_handler
);
}
return
NULL
;
}
SalBodyHandler
*
sal_body_handler_from_content
(
const
LinphoneContent
*
content
)
{
if
(
content
==
NULL
)
return
NULL
;
return
content
->
body_handler
;
}
coreapi/friendlist.c
View file @
71149521
...
...
@@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <bctoolbox/crypto.h>
#include "linphone/api/c-content.h"
#include "linphone/core.h"
#include "c-wrapper/c-wrapper.h"
...
...
@@ -961,7 +962,7 @@ void linphone_friend_list_notify_presence_received(LinphoneFriendList *list, Lin
const
char
*
subtype
=
linphone_content_get_subtype
(
body
);
if
((
strcmp
(
type
,
"multipart"
)
!=
0
)
||
(
strcmp
(
subtype
,
"related"
)
!=
0
))
{
ms_warning
(
"multipart presence notified but it is not 'multipart/related'
"
);
ms_warning
(
"multipart presence notified but it is not 'multipart/related'
, instead is '%s/%s'"
,
type
,
subtype
);
return
;
}
...
...
coreapi/info.c
View file @
71149521
...
...
@@ -23,6 +23,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphone/api/c-content.h"
#include "linphone/core.h"
#include "linphone/lpconfig.h"
...
...
coreapi/lime.c
View file @
71149521
...
...
@@ -17,6 +17,8 @@ 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/api/c-content.h"
#include "lime.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
...
...
@@ -419,6 +421,8 @@ int lime_encryptFile(void **cryptoContext, unsigned char *key, size_t length, ch
int
lime_decryptFile
(
void
**
cryptoContext
,
unsigned
char
*
key
,
size_t
length
,
char
*
plain
,
char
*
cipher
)
{
bctbx_aes_gcm_context_t
*
gcmContext
;
if
(
key
==
NULL
)
return
-
1
;
if
(
*
cryptoContext
==
NULL
)
{
/* first call to the function, allocate a crypto context and initialise it */
/* key contains 192bits of key || 64 bits of Initialisation Vector, no additional data */
gcmContext
=
bctbx_aes_gcm_context_new
(
key
,
24
,
NULL
,
0
,
key
+
24
,
8
,
BCTBX_GCM_DECRYPT
);
...
...
@@ -787,8 +791,8 @@ int lime_im_encryption_engine_process_incoming_message_cb(LinphoneImEncryptionEn
LinphoneCore
*
lc
=
linphone_im_encryption_engine_get_core
(
engine
);
int
errcode
=
-
1
;
/* check if we have a xml/cipher message to be decrypted */
if
(
linphone_chat_message_get_content_type
(
msg
)
&&
(
strcmp
(
"xml/cipher"
,
linphone_chat_message_get_content_type
(
msg
))
==
0
||
if
(
linphone_chat_message_get_content_type
(
msg
)
&&
(
strcmp
(
"xml/cipher"
,
linphone_chat_message_get_content_type
(
msg
))
==
0
||
strcmp
(
"application/cipher.vnd.gsma.rcs-ft-http+xml"
,
linphone_chat_message_get_content_type
(
msg
))
==
0
))
{
errcode
=
0
;
int
retval
;
...
...
@@ -893,6 +897,7 @@ int lime_im_encryption_engine_process_downloading_file_cb(LinphoneImEncryptionEn
LinphoneContent
*
content
=
linphone_chat_message_get_file_transfer_information
(
msg
);
if
(
!
content
)
return
-
1
;
if
(
!
linphone_content_get_key
(
content
))
{
linphone_content_unref
(
content
);
return
-
1
;
...
...
coreapi/linphonecore.c
View file @
71149521
...
...
@@ -18,10 +18,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/api/c-content.h"
#include "linphone/core.h"
#include "linphone/sipsetup.h"
#include "linphone/lpconfig.h"
#include "linphone/logging.h"
#include "linphone/sipsetup.h"
#include "private.h"
#include "logging-private.h"
#include "quality_reporting.h"
...
...
coreapi/private_structs.h
View file @
71149521
...
...
@@ -449,17 +449,6 @@ struct _EchoTester {
unsigned
int
rate
;
};
struct
_LinphoneContent
{
belle_sip_object_t
base
;
void
*
user_data
;
SalBodyHandler
*
body_handler
;
char
*
name
;
/**< used by RCS File transfer messages to store the original filename of the file to be downloaded from server */
char
*
key
;
/**< used by RCS File transfer messages to store the key to encrypt file if needed */
size_t
keyLength
;
/**< Length of key in bytes */
void
*
cryptoContext
;
/**< crypto context used to encrypt file for RCS file transfer */
bool_t
owned_fields
;
};
BELLE_SIP_DECLARE_VPTR_NO_EXPORT
(
LinphoneContent
);
struct
_LinphoneBuffer
{
...
...
coreapi/proxy.c
View file @
71149521
...
...
@@ -25,6 +25,7 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org)
#include "linphone/core.h"
#include "linphone/lpconfig.h"
#include "linphone/sipsetup.h"
#include "mediastreamer2/mediastream.h"
#include "enum.h"
...
...
coreapi/quality_reporting.c
View file @
71149521
...
...
@@ -21,7 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "config.h"
#endif
#include "linphone/api/c-content.h"
#include "linphone/core.h"
#include "private.h"
#include "c-wrapper/internal/c-sal.h"
#include "sal/sal.h"
...
...
include/CMakeLists.txt
View file @
71149521
...
...
@@ -33,7 +33,6 @@ set(ROOT_HEADER_FILES
chat.h
conference.h
contactprovider.h
content.h
core_utils.h
core.h
defs.h
...
...
@@ -85,6 +84,7 @@ set(C_API_HEADER_FILES
c-chat-message.h
c-chat-room-cbs.h
c-chat-room.h
c-content.h
c-dial-plan.h
c-event-log.h
c-magic-search.h
...
...
include/linphone/Makefile.am
View file @
71149521
...
...
@@ -14,7 +14,6 @@ linphone_include_HEADERS=\
chat.h
\
conference.h
\
contactprovider.h
\
content.h
\
core.h
\
core_utils.h
\
defs.h
\
...
...
include/linphone/api/c-api.h
View file @
71149521
...
...
@@ -23,14 +23,15 @@
#include "linphone/utils/general.h"
#include "linphone/api/c-address.h"
#include "linphone/api/c-call.h"
#include "linphone/api/c-call-cbs.h"
#include "linphone/api/c-call-stats.h"
#include "linphone/api/c-call.h"
#include "linphone/api/c-callbacks.h"
#include "linphone/api/c-chat-message.h"
#include "linphone/api/c-chat-message-cbs.h"
#include "linphone/api/c-chat-
room
.h"
#include "linphone/api/c-chat-
message
.h"
#include "linphone/api/c-chat-room-cbs.h"
#include "linphone/api/c-chat-room.h"
#include "linphone/api/c-content.h"
#include "linphone/api/c-dial-plan.h"
#include "linphone/api/c-event-log.h"
#include "linphone/api/c-participant.h"
...
...
include/linphone/api/c-chat-room.h
View file @
71149521
...
...
@@ -90,7 +90,7 @@ LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message_2(Linphon
* @param initial_content #LinphoneContent initial content. #LinphoneCoreVTable.file_transfer_send is invoked later to notify file transfer progress and collect next chunk of the message if LinphoneContent.data is NULL.
* @return a new #LinphoneChatMessage
*/
LINPHONE_PUBLIC
LinphoneChatMessage
*
linphone_chat_room_create_file_transfer_message
(
LinphoneChatRoom
*
cr
,
const
LinphoneContent
*
initial_content
);
LINPHONE_PUBLIC
LinphoneChatMessage
*
linphone_chat_room_create_file_transfer_message
(
LinphoneChatRoom
*
cr
,
LinphoneContent
*
initial_content
);
/**
* get peer address \link linphone_core_get_chat_room() associated to \endlink this #LinphoneChatRoom
...
...
include/linphone/content.h
→
include/linphone/
api/c-
content.h
View file @
71149521
/*
content.h
Copyright (C) 2010-201
4
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 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.
*/
#ifndef
LINPHONE
_CONTENT_H_
#define
LINPHONE
_CONTENT_H_
#include "linphone/types.h"
* c-
content.h
*
Copyright (C) 2010-201
8
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 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.
*/
#ifndef
_L_C
_CONTENT_H_
#define
_L_C
_CONTENT_H_
#include "linphone/api/c-types.h"
// =============================================================================
#ifdef __cplusplus
extern
"C"
{
#endif
extern
"C"
{
#endif // ifdef __cplusplus
/**
* @addtogroup misc
...
...
@@ -89,6 +88,14 @@ LINPHONE_PUBLIC const char * linphone_content_get_subtype(const LinphoneContent
*/
LINPHONE_PUBLIC
void
linphone_content_set_subtype
(
LinphoneContent
*
content
,
const
char
*
subtype
);
/**
* Adds a parameter to the ContentType header.
* @param[in] content LinphoneContent object.
* @param[in] name the name of the parameter to add.
* @param[in] value the value of the parameter to add.
*/
LINPHONE_PUBLIC
void
linphone_content_add_content_type_parameter
(
LinphoneContent
*
content
,
const
char
*
name
,
const
char
*
value
);
/**
* Get the content data buffer, usually a string.
* @param[in] content #LinphoneContent object.
...
...
@@ -218,9 +225,8 @@ LINPHONE_PUBLIC void linphone_content_set_key(LinphoneContent *content, const ch
* @}
*/
#ifdef __cplusplus
}
#endif
}
#endif
// ifdef __cplusplus
#endif
/
* LINPHONE
_CONTENT_H_
*/
#endif /
/ ifndef _L_C
_CONTENT_H_
\ No newline at end of file
include/linphone/api/c-types.h
View file @
71149521
...
...
@@ -144,6 +144,12 @@ typedef struct _LinphoneEventLog LinphoneEventLog;
// Misc.
// -----------------------------------------------------------------------------
/**
* The LinphoneContent object holds data that can be embedded in a signaling message.
* @ingroup misc
**/
typedef
struct
_LinphoneContent
LinphoneContent
;
/**
* Represents a dial plan
* @ingroup misc
...
...
include/linphone/core.h
View file @
71149521
...
...
@@ -42,7 +42,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "linphone/call_stats.h"
#include "linphone/chat.h"
#include "linphone/conference.h"
#include "linphone/content.h"
#include "linphone/dictionary.h"
#include "linphone/error_info.h"
#include "linphone/event.h"
...
...
include/linphone/types.h
View file @
71149521
...
...
@@ -367,12 +367,6 @@ typedef unsigned int LinphoneContactSearchID;