mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Merge branch 'dev_refactor_cpp' into dev_chatroom_list_subscription
This commit is contained in:
commit
04bff71ae0
6 changed files with 21 additions and 15 deletions
|
|
@ -486,7 +486,7 @@ static void sdp_parse_payload_types(belle_sdp_media_description_t *media_desc, S
|
|||
static void sdp_parse_media_crypto_parameters(belle_sdp_media_description_t *media_desc, SalStreamDescription *stream) {
|
||||
belle_sip_list_t *attribute_it;
|
||||
belle_sdp_attribute_t *attribute;
|
||||
char tmp[256], tmp2[256], parameters[256]={0};
|
||||
char tmp[257], tmp2[257], parameters[257]={0};
|
||||
int valid_count = 0;
|
||||
int nb;
|
||||
|
||||
|
|
|
|||
|
|
@ -2246,7 +2246,9 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig
|
|||
// We need the Sal on the Android platform helper init
|
||||
msplugins_dir = linphone_factory_get_msplugins_dir(lfactory);
|
||||
image_resources_dir = linphone_factory_get_image_resources_dir(lfactory);
|
||||
|
||||
lc->sal=new Sal(NULL);
|
||||
lc->sal->set_refresher_retry_after(lp_config_get_int(lc->config, "sip", "refresher_retry_after", 60000));
|
||||
lc->sal->set_http_proxy_host(linphone_core_get_http_proxy_host(lc));
|
||||
lc->sal->set_http_proxy_port(linphone_core_get_http_proxy_port(lc));
|
||||
|
||||
|
|
|
|||
|
|
@ -608,7 +608,9 @@ LinphoneReason ChatMessagePrivate::receive () {
|
|||
if (errorCode <= 0) {
|
||||
bool foundSupportContentType = false;
|
||||
for (Content *c : contents) {
|
||||
if (linphone_core_is_content_type_supported(core->getCCore(), c->getContentType().asString().c_str())) {
|
||||
ContentType ct(c->getContentType());
|
||||
ct.cleanParameters();
|
||||
if (linphone_core_is_content_type_supported(core->getCCore(), ct.asString().c_str())) {
|
||||
foundSupportContentType = true;
|
||||
break;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
|
|||
);
|
||||
|
||||
Content content;
|
||||
if (message->url && (ContentType(message->content_type) == ContentType::ExternalBody)) {
|
||||
if (message->url && (ContentType(message->content_type).weakEqual(ContentType::ExternalBody))) {
|
||||
lInfo() << "Received a message with an external body URL " << message->url;
|
||||
content.setContentType(ContentType::FileTransfer);
|
||||
content.setBody(msg->getPrivate()->createFakeFileTransferFromUrl(message->url));
|
||||
|
|
|
|||
|
|
@ -237,17 +237,17 @@ public:
|
|||
|
||||
Cpim::Parser::Parser () : Singleton(*new ParserPrivate) {
|
||||
L_D();
|
||||
#if TARGET_OS_IPHONE
|
||||
CFBundleRef bundle = CFBundleGetBundleWithIdentifier( CFSTR("org.linphone.linphone") );
|
||||
CFURLRef grammar_url = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), NULL, NULL);
|
||||
CFStringRef grammar_path = CFURLCopyFileSystemPath(grammar_url, kCFURLPOSIXPathStyle);
|
||||
CFStringEncoding encoding_method = CFStringGetSystemEncoding();
|
||||
const char *path = CFStringGetCStringPtr(grammar_path, encoding_method);
|
||||
CFRelease(grammar_url);
|
||||
CFRelease(grammar_path);
|
||||
#else
|
||||
const char *path = CPIM_GRAMMAR;
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("org.linphone.linphone"));
|
||||
CFURLRef grammarUrl = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), nullptr, nullptr);
|
||||
CFStringRef grammarPath = CFURLCopyFileSystemPath(grammarUrl, kCFURLPOSIXPathStyle);
|
||||
CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
|
||||
const char *path = CFStringGetCStringPtr(grammarPath, encodingMethod);
|
||||
CFRelease(grammarUrl);
|
||||
CFRelease(grammarPath);
|
||||
#else
|
||||
const char *path = CPIM_GRAMMAR;
|
||||
#endif
|
||||
d->grammar = belr::GrammarLoader::get().load(path);
|
||||
if (!d->grammar)
|
||||
lFatal() << "Unable to load CPIM grammar.";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ public:
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {}
|
||||
FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {
|
||||
setContentType(ContentType::FileTransfer);
|
||||
}
|
||||
|
||||
FileTransferContent::FileTransferContent (const FileTransferContent &other) : Content(*new FileTransferContentPrivate) {
|
||||
L_D();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue