采用纯oc sdk解决版本适配问题;解决呼叫不能截屏问题
| | |
| | | |
| | | let sAddr = Address.getSwiftObject(cObject: addr!) |
| | | if (HDLCallManager.callKitEnabled() && !HDLCallManager.instance().nextCallIsTransfer) { |
| | | print("callKitEnabled") |
| | | // HDLCallManager.configAudioSession(audioSession: AVAudioSession.sharedInstance()) |
| | | |
| | | let uuid = UUID() |
| | | let name = "unknow" |
| | | let handle = CXHandle(type: .generic, value: name) |
| | |
| | | |
| | | requestTransaction(transaction, action: "startCall") |
| | | }else { |
| | | print("doCall") |
| | | try? doCall(addr: sAddr, isSas: isSas) |
| | | } |
| | | } |
| | |
| | | lcallParams.mediaEncryption = .ZRTP |
| | | } |
| | | lcallParams.videoEnabled=true; |
| | | |
| | | let call = HDLCallManager.instance().lc!.inviteAddressWithParams(addr: addr, params: lcallParams) |
| | | if (call != nil) { |
| | | // The LinphoneCallAppData object should be set on call creation with callback |
| | |
| | | } catch { |
| | | |
| | | } |
| | | // LinphoneCall *currentcall = linphone_core_get_current_call(LC); |
| | | // if (linphone_core_is_in_conference(LC) || // In conference |
| | | // (linphone_core_get_conference_size(LC) > 0 && [UIHangUpButton callCount] == 0) // Only one conf |
| | | // ) { |
| | | // LinphoneManager.instance.conf = TRUE; |
| | | // linphone_core_terminate_conference(LC); |
| | | // } else if (currentcall != NULL) { |
| | | // linphone_call_terminate(currentcall); |
| | | // } else { |
| | | // const MSList *calls = linphone_core_get_calls(LC); |
| | | // if (bctbx_list_size(calls) == 1) { // Only one call |
| | | // linphone_call_terminate((LinphoneCall *)(calls->data)); |
| | | // } |
| | | // } |
| | | if (UIApplication.shared.applicationState == .background) { |
| | | HDLCoreManager.instance().stopLinphoneCore() |
| | | } |
| | |
| | | case .StreamsRunning: |
| | | if (HDLCallManager.callKitEnabled()) { |
| | | let uuid = HDLCallManager.instance().providerDelegate.uuids["\(callId!)"] |
| | | // print("所有uuids:\(HDLCallManager.instance().providerDelegate.uuids)") |
| | | if (uuid != nil) { |
| | | print("有uuid的") |
| | | let callInfo = HDLCallManager.instance().providerDelegate.callInfos[uuid!] |
| | | if (callInfo != nil && callInfo!.isOutgoing && !callInfo!.connected) { |
| | | |
| | |
| | | HDLCoreManagerDelegate.speaker_already_enabled = true |
| | | } |
| | | break |
| | | case .OutgoingProgress: |
| | | print("OutgoingRinging") |
| | | break |
| | | case .OutgoingRinging: |
| | | print("OutgoingRinging") |
| | | if (HDLCallManager.callKitEnabled()) { |
| | | let uuid = HDLCallManager.instance().providerDelegate.uuids[""] |
| | | if (uuid != nil) { |
| | | // print("有uuid的:\(String(describing: uuid))") |
| | | let callInfo = HDLCallManager.instance().providerDelegate.callInfos[uuid!] |
| | | callInfo!.callId = callId! |
| | | HDLCallManager.instance().providerDelegate.callInfos.updateValue(callInfo!, forKey: uuid!) |
| | |
| | | /** 开启倒计时 */ |
| | | - (void)startOpenDoorCountdown { |
| | | |
| | | if (_openDoorTimeout > 20) { |
| | | if (_openDoorTimeout > 10) { |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | dispatch_source_set_event_handler(_openDoorTimer, ^{ |
| | | WEAKSELF_AT |
| | | if(weakSelf_AT.openDoorTimeout >= 20 ){// 计时结束 |
| | | if(weakSelf_AT.openDoorTimeout >= 10 ){// 计时结束 |
| | | // 关闭定时器 |
| | | dispatch_source_cancel(weakSelf_AT.openDoorTimer); |
| | | |
| | |
| | | 暂停播放 |
| | | */ |
| | | - (void)stopPlay { |
| | | |
| | | [HDLLinphoneManager.instance endCall]; |
| | | |
| | | |
| | | } |
| | | |
| | | - (void)startPlay { |
| | |
| | | - (void)registrationUpdate:(NSNotification *)notif { |
| | | LinphoneRegistrationState state = [[notif.userInfo objectForKey:@"state"] intValue]; |
| | | if (state == LinphoneRegistrationFailed){ |
| | | NSLog(@"登失败"); |
| | | NSLog(@"登录失败"); |
| | | }else if (state == LinphoneRegistrationCleared){ |
| | | NSLog(@"登录清空"); |
| | | } else if (state == LinphoneRegistrationOk) { |
| | |
| | | [self initCentetView]; |
| | | [self initData]; |
| | | [self initESVideo]; |
| | | //开始反呼 |
| | | //开始震动 |
| | | [self StartReverseCall]; |
| | | [self ShowCalltimeBtn:callingStr]; |
| | | //注册开锁成功监听 |
| | |
| | | [_screenshotImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_takephoto_unselect"] forState:UIControlStateNormal]; |
| | | |
| | | //截图 |
| | | [HDLLinphoneManager.instance snapShotWithView:self.videoView]; |
| | | |
| | | } |
| | | |
| | |
| | | // [[HDLCallManager instance] acceptCallByCallID:self.CallId hasVideo:self.hasVideo]; |
| | | [[HDLLinphoneManager instance] acceptCall]; |
| | | /// 开启对讲 |
| | | [self startTalk]; |
| | | // [self startTalk]; |
| | | |
| | | _answerImgBtn.hidden = YES; |
| | | _answerTextBtn.hidden = YES; |
| | |
| | | /** 开启倒计时 */ |
| | | - (void)startOpenDoorCountdown { |
| | | |
| | | if (_openDoorTimeout > 20) { |
| | | if (_openDoorTimeout > 10) { |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | dispatch_source_set_event_handler(_openDoorTimer, ^{ |
| | | WEAKSELF_AT |
| | | if(weakSelf_AT.openDoorTimeout >= 20 ){// 计时结束 |
| | | if(weakSelf_AT.openDoorTimeout >= 10 ){// 计时结束 |
| | | // 关闭定时器 |
| | | dispatch_source_cancel(weakSelf_AT.openDoorTimer); |
| | | |
| | |
| | | linphone_core_add_callbacks(theLinphoneCore, cbs); |
| | | |
| | | [HDLCallManager.instance setCoreWithCore:theLinphoneCore]; |
| | | [HDLCoreManager.instance setCoreWithCore:theLinphoneCore]; |
| | | // [HDLCoreManager.instance setCoreWithCore:theLinphoneCore]; |
| | | [HDLConfigManager.instance setDbWithDb:_configDb]; |
| | | |
| | | linphone_core_start(theLinphoneCore); |
| | |
| | | } |
| | | |
| | | -(void)endCall{ |
| | | LinphoneCall * call = linphone_core_get_current_call(theLinphoneCore); |
| | | [HDLCallManager.instance terminateCallWithCall:call]; |
| | | // LinphoneCall * call = linphone_core_get_current_call(theLinphoneCore); |
| | | // [HDLCallManager.instance terminateCallWithCall:call]; |
| | | // |
| | | |
| | | LinphoneCall *currentcall = linphone_core_get_current_call(theLinphoneCore); |
| | | |
| | | if (linphone_core_is_in_conference(theLinphoneCore) || // In conference |
| | | |
| | | (linphone_core_get_conference_size(theLinphoneCore) > 0 ) // Only one conf |
| | | ) { |
| | | // NSLog(@"是会议"); |
| | | linphone_core_terminate_conference(theLinphoneCore); |
| | | } else if (currentcall != NULL) { |
| | | linphone_call_terminate(currentcall); |
| | | |
| | | } else { |
| | | // NSLog(@"其它情况"); |
| | | const MSList *calls = linphone_core_get_calls(theLinphoneCore); |
| | | if (bctbx_list_size(calls) == 1) { // Only one call |
| | | linphone_call_terminate((LinphoneCall *)(calls->data)); |
| | | } |
| | | } |
| | | } |
| | | -(void)acceptCall{ |
| | | // [HDLCallManager configAudioSessionWithAudioSession:[AVAudioSession sharedInstance]]; |
| | |
| | | return; |
| | | } |
| | | // For OutgoingCall, show CallOutgoingView |
| | | |
| | | [HDLCallManager.instance startCallWithAddr:iaddr isSas:FALSE]; |
| | | } |
| | | |
| | |
| | | linphone_core_set_video_preset([HDLLinphoneManager getLc], [@"custom" UTF8String]); |
| | | linphone_core_set_preferred_framerate([HDLLinphoneManager getLc], 5); |
| | | |
| | | |
| | | // LinphoneVideoPolicy policy; |
| | | // policy.automatically_initiate = YES; |
| | | // policy.automatically_accept = YES; |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * charconv.h |
| | | * Copyright (C) 2010-2018 Belledonne Communications SARL |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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 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 |
| | |
| | | * 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/>. |
| | | * along with this program; if not, write to the Free Software |
| | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| | | */ |
| | | |
| | | #ifndef BCTBX_CHARCONV_H |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * compiler.h |
| | | * Copyright (C) 2010-2018 Belledonne Communications SARL |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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 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 |
| | |
| | | * 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/>. |
| | | * along with this program; if not, write to the Free Software |
| | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| | | */ |
| | | |
| | | #ifndef COMPILER_H |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | crypto.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 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 BCTBX_CRYPTO_H |
| | | #define BCTBX_CRYPTO_H |
| | | |
| | |
| | | * @Brief Conclude a AES-GCM encryption stream, generate tag if requested, free resources |
| | | * |
| | | * @param[in/out] context a context already initialized using bctbx_aes_gcm_context_new |
| | | * @param[out] tag a buffer to hold the authentication tag. Can be NULL if tagLength is 0 |
| | | * @param[in] tagLength length of requested authentication tag, max 16 |
| | | * @param[out] tag a buffer to hold the authentication tag. Can be NULL if tagLength is 0 |
| | | * @param[in] tagLength length of reqested authentication tag, max 16 |
| | | * |
| | | * @return 0 on success, crypto library error code otherwise |
| | | */ |
| | |
| | | /** |
| | | * @brief encrypt the file in input buffer for linphone encrypted file transfer |
| | | * |
| | | * This function must be called with NULL in the plain text to conclude the encryption. |
| | | * At this last call, if a cipher buffer is provided with non 0 length, it will get an authentication tag of the requested size (max 16) |
| | | * |
| | | * @param[in/out] cryptoContext a context already initialized using bctbx_aes_gcm_context_new (created if NULL) |
| | | * @param[in/out] cryptoContext a context already initialized using bctbx_aes_gcm_context_new |
| | | * @param[in] key encryption key |
| | | * @param[in] length buffer size |
| | | * @param[in] plain buffer holding the input data |
| | | * @param[out] cipher buffer to store the output data (cipher or authentication tag) |
| | | * @param[out] cipher buffer to store the output data |
| | | */ |
| | | BCTBX_PUBLIC int bctbx_aes_gcm_encryptFile(void **cryptoContext, unsigned char *key, size_t length, char *plain, char *cipher); |
| | | |
| | | /** |
| | | * @brief decrypt the file in input buffer for linphone encrypted file transfer |
| | | * |
| | | * This function must be called with NULL in the cipher text to conclude the encryption. |
| | | * At this last call, if a plain buffer is provided with non 0 length, it will get the authentication tag of length bytes (max 16) |
| | | * |
| | | * @param[in/out] cryptoContext a context already initialized using bctbx_aes_gcm_context_new |
| | | * @param[in] key encryption key |
| | | * @param[in] length input buffer size |
| | | * @param[out] plain buffer holding the output data (plain text or tag) |
| | | * @param[in] cipher buffer to store the input data. WARNING: size must be a multiple of 16 bytes |
| | | * @param[in] length buffer size |
| | | * @param[out] plain buffer holding the output data |
| | | * @param[int] cipher buffer to store the input data |
| | | */ |
| | | BCTBX_PUBLIC int bctbx_aes_gcm_decryptFile(void **cryptoContext, unsigned char *key, size_t length, char *plain, char *cipher); |
| | | |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | defs.h |
| | | Copyright (C) 2010-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 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 BCTBX_DEFS_H_ |
| | | #define BCTBX_DEFS_H_ |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | bctoolbox |
| | | Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | #ifndef BCTBX_LIST_H_ |
| | | #define BCTBX_LIST_H_ |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | bctoolobx |
| | | Copyright (C) 2016 Belledonne Communications, France, Grenoble |
| | | |
| | | This library is free software; you can redistribute it and/or |
| | | modify it under the terms of the GNU Lesser General Public |
| | | License as published by the Free Software Foundation; either |
| | | version 2.1 of the License, or (at your option) any later version. |
| | | |
| | | This library 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 |
| | | Lesser General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU Lesser General Public |
| | | License along with this library; if not, write to the Free Software |
| | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| | | */ |
| | | |
| | | /** |
| | | * \file logging.h |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | bctoolbox mmap |
| | | Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | #ifndef BCTBX_MMAP_H_ |
| | | #define BCTBX_MMAP_H_ |
| | |
| | | BCTBX_PUBLIC bctbx_iterator_t *bctbx_map_cchar_end(const bctbx_map_t *map); |
| | | /*return a new allocated iterator or null*/ |
| | | #define bctbx_map_find_custom bctbx_map_ullong_find_custom |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_ullong_find_custom(const bctbx_map_t *map, bctbx_compare_func compare_func, const void *user_data); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_cchar_find_custom(const bctbx_map_t *map, bctbx_compare_func compare_func, const void *user_data); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_ullong_find_custom(bctbx_map_t *map, bctbx_compare_func compare_func, const void *user_data); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_cchar_find_custom(bctbx_map_t *map, bctbx_compare_func compare_func, const void *user_data); |
| | | /*return the iterator associated to the key in the map or Null*/ |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_ullong_find_key(const bctbx_map_t *map, unsigned long long key); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_cchar_find_key(const bctbx_map_t *map, const char * key); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_ullong_find_key(bctbx_map_t *map, unsigned long long key); |
| | | BCTBX_PUBLIC bctbx_iterator_t * bctbx_map_cchar_find_key(bctbx_map_t *map, const char * key); |
| | | /* return the size of the map*/ |
| | | #define bctbx_map_size bctbx_map_ullong_size |
| | | BCTBX_PUBLIC size_t bctbx_map_ullong_size(const bctbx_map_t *map); |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | bctoolbox |
| | | 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 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, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | #ifndef BCTBX_PARSER_H_ |
| | | #define BCTBX_PARSER_H_ |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack. |
| | | Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org |
| | | |
| | | This library is free software; you can redistribute it and/or |
| | | modify it under the terms of the GNU Lesser General Public |
| | | License as published by the Free Software Foundation; either |
| | | version 2.1 of the License, or (at your option) any later version. |
| | | |
| | | This library 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 |
| | | Lesser General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU Lesser General Public |
| | | License along with this library; if not, write to the Free Software |
| | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| | | */ |
| | | /* this file is responsible of the portability of the stack */ |
| | | |
| | | #ifndef BCTBX_PORT_H |
| | |
| | | |
| | | #define getSocketError() strerror(errno) |
| | | #define getSocketErrorCode() (errno) |
| | | #define getSocketErrorWithCode(code) strerror(code) |
| | | #define bctbx_gettimeofday(tv,tz) gettimeofday(tv,tz) |
| | | #define bctbx_log10f(x) log10f(x) |
| | | |
| | |
| | | |
| | | #endif |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | BCTBX_PUBLIC const char *__bctbx_getWinSocketError(int error); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | |
| | | #ifndef getSocketErrorCode |
| | | #define getSocketErrorCode() WSAGetLastError() |
| | | #define getSocketErrorCode() WSAGetLastError() |
| | | #endif |
| | | #ifndef getSocketError |
| | | #define getSocketError() __bctbx_getWinSocketError(WSAGetLastError()) |
| | | #endif |
| | | #ifndef getSocketErrorWithCode |
| | | #define getSocketErrorWithCode(code) __bctbx_getWinSocketError(code) |
| | | #define getSocketError() __bctbx_getWinSocketError(WSAGetLastError()) |
| | | #endif |
| | | |
| | | #ifndef snprintf |
| | |
| | | |
| | | BCTBX_PUBLIC int bctbx_socket_set_non_blocking(bctbx_socket_t sock); |
| | | |
| | | #ifdef __GNUC__ |
| | | # define BCTBX_PRINTF_LIKE(format_pos, args_pos) __attribute__ ((format (printf, format_pos, args_pos))) |
| | | #else |
| | | # define BCTBX_PRINTF_LIKE(format_pos, args_pos) |
| | | #endif |
| | | |
| | | BCTBX_PUBLIC char *bctbx_strndup(const char *str,int n); |
| | | BCTBX_PUBLIC char *bctbx_strdup_printf(const char *fmt,...) BCTBX_PRINTF_LIKE(1, 2); |
| | | BCTBX_PUBLIC char *bctbx_strdup_printf(const char *fmt,...); |
| | | BCTBX_PUBLIC char *bctbx_strdup_vprintf(const char *fmt, va_list ap); |
| | | BCTBX_PUBLIC char *bctbx_strcat_printf(char *dst, const char *fmt,...) BCTBX_PRINTF_LIKE(2, 3); |
| | | BCTBX_PUBLIC char *bctbx_strcat_printf(char *dst, const char *fmt,...); |
| | | BCTBX_PUBLIC char *bctbx_strcat_vprintf(char *dst, const char *fmt, va_list ap); |
| | | BCTBX_PUBLIC char *bctbx_concat(const char *str, ...); |
| | | BCTBX_PUBLIC char *bctbx_replace(char *str, char c, char n); |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | bctoolbox |
| | | Copyright (C) 2016 Belledonne Communications SARL. |
| | | |
| | | This program is free software: you can redistribute it and/or modify |
| | | it under the terms of the GNU Affero 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 Affero General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU Affero General Public License |
| | | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | #ifndef BCTBX_REGEX_H |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | tester - liblinphone test suite |
| | | Copyright (C) 2013 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, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | #ifndef BCTOOLBOX_TESTER_H |
| | | #define BCTOOLBOX_TESTER_H |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | vconnect.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 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 BCTBX_VCONNECT |
| | | #define BCTBX_VCONNECT |
| | |
| | | /* |
| | | * Copyright (c) 2016-2020 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of bctoolbox. |
| | | * |
| | | * 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/>. |
| | | */ |
| | | vfs.h |
| | | Copyright (C) 2016 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 BCTBX_VFS_H |
| | | #define BCTBX_VFS_H |
| | |
| | | belle_sip_user_body_handler_stop_callback_t stop_cb, |
| | | void *data); |
| | | |
| | | /** |
| | | * @brief Buffering user body handler creation |
| | | * Buffering file bodyhandler will buffer the received chunks to deliver only modulo(buffer_size) chunks. |
| | | * The bufferized part, if any, is prepended to the next chunk, |
| | | * what remains in buffer when the end function is called is delivered through a last call to rcv_chunk |
| | | * The original purpose of this is to be able to deliver modulo(16) size chunks to the file transfer decryption function |
| | | */ |
| | | BELLESIP_EXPORT belle_sip_user_body_handler_t *belle_sip_buffering_user_body_handler_new( |
| | | size_t total_size, |
| | | size_t buffer_size, |
| | | belle_sip_body_handler_progress_callback_t progress_cb, |
| | | belle_sip_user_body_handler_start_callback_t start_cb, |
| | | belle_sip_user_body_handler_recv_callback_t recv_cb, |
| | | belle_sip_user_body_handler_send_callback_t send_cb, |
| | | belle_sip_user_body_handler_stop_callback_t stop_cb, |
| | | void *data); |
| | | |
| | | /** |
| | | * Body handler that gets/puts data from/to a file. |
| | |
| | | #define BELLE_SIP_FILE_BODY_HANDLER(obj) BELLE_SIP_CAST(obj, belle_sip_file_body_handler_t) |
| | | |
| | | BELLESIP_EXPORT belle_sip_file_body_handler_t *belle_sip_file_body_handler_new(const char *filepath, belle_sip_body_handler_progress_callback_t progress_cb, void *data); |
| | | |
| | | /** |
| | | * @brief Buffering file body handler creation |
| | | * Buffering file bodyhandler will buffer the received chunks to deliver only modulo(buffer_size) chunks. |
| | | * The bufferized part, if any, is prepended to the next chunk, |
| | | * what remains in buffer when the end function is called is delivered through a last call to rcv_chunk |
| | | * The original purpose of this is to be able to deliver modulo(16) size chunks to the file transfer decryption function |
| | | */ |
| | | BELLESIP_EXPORT belle_sip_file_body_handler_t *belle_sip_buffering_file_body_handler_new(const char *filepath, const size_t buffer_size, belle_sip_body_handler_progress_callback_t progress_cb, void *data); |
| | | BELLESIP_EXPORT size_t belle_sip_file_body_handler_get_file_size(belle_sip_file_body_handler_t *file_bh); |
| | | BELLESIP_EXPORT void belle_sip_file_body_handler_set_user_body_handler(belle_sip_file_body_handler_t *file_bh, belle_sip_user_body_handler_t *user_bh); |
| | | |
| | |
| | | **/ |
| | | BELLESIP_EXPORT unsigned int belle_sip_dialog_get_local_seq_number(const belle_sip_dialog_t *dialog); |
| | | |
| | | BELLESIP_EXPORT unsigned int belle_sip_dialog_get_remote_seq_number(const belle_sip_dialog_t *dialog); |
| | | unsigned int belle_sip_dialog_get_remote_seq_number(const belle_sip_dialog_t *dialog); |
| | | |
| | | BELLESIP_EXPORT const char *belle_sip_dialog_get_local_tag(const belle_sip_dialog_t *dialog); |
| | | |
| | |
| | | /* |
| | | * Copyright (c) 2012-2019 Belledonne Communications SARL. |
| | | * |
| | | * This file is part of belle-sip. |
| | | * |
| | | * 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/>. |
| | | */ |
| | |
| | | |
| | | BELLE_SIP_BEGIN_DECLS |
| | | |
| | | |
| | | /*************************************************************************************** |
| | | * header address |
| | | * |
| | | **************************************************************************************/ |
| | | |
| | | typedef struct _belle_sip_header_address belle_sip_header_address_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_new(void); |
| | |
| | | * */ |
| | | BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_create2(const char* display, belle_generic_uri_t* uri); |
| | | |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_parse (const char* address) ; |
| | | |
| | | /* |
| | | same as belle_sip_header_address_parse but with less syntax checking |
| | | */ |
| | | BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_fast_parse (const char* address) ; |
| | | |
| | | |
| | | /** |
| | | * returns a sip uri. A header address cannot have both a sip uri and an absolute uri. |
| | |
| | | BELLESIP_EXPORT void belle_sip_header_address_set_absolute_uri(belle_sip_header_address_t* address, belle_generic_uri_t* uri); |
| | | |
| | | /** |
| | | * Enable automatic filling of the contact ip, port and transport according to the channel that sends this message. |
| | | * Enable automatic filling of the contact ip, port and transport according to the channel that sends this message. |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_header_address_set_automatic(belle_sip_header_address_t *address, int automatic); |
| | | |
| | | BELLESIP_EXPORT int belle_sip_header_address_get_automatic(const belle_sip_header_address_t *address); |
| | | |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT const char* belle_sip_header_address_get_displayname(const belle_sip_header_address_t* address); |
| | | /** |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_header_address_set_displayname(belle_sip_header_address_t* address, const char* uri); |
| | | |
| | |
| | | BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_clone(const belle_sip_header_address_t* orig); |
| | | |
| | | |
| | | |
| | | #define BELLE_SIP_HEADER_ADDRESS(t) BELLE_SIP_CAST(t,belle_sip_header_address_t) |
| | | |
| | | |
| | | |
| | | /*************************************************************************************** |
| | | * header common |
| | | * |
| | | **************************************************************************************/ |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_t* belle_sip_header_parse (const char* header); |
| | | BELLESIP_EXPORT belle_sip_header_t* belle_sip_header_create (const char* name,const char* value); |
| | | BELLESIP_EXPORT belle_sip_header_t* belle_http_header_create (const char* name,const char* value); |
| | |
| | | #define BELLE_SIP_HEADER(t) BELLE_SIP_CAST(t,belle_sip_header_t) |
| | | |
| | | /****************************** |
| | | * |
| | | * Allow header inherit from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_allow belle_sip_header_allow_t; |
| | | |
| | |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_contact_t* belle_sip_header_contact_new(void); |
| | | |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_contact_t* belle_sip_header_contact_parse (const char* contact) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_contact_t* belle_sip_header_contact_create (const belle_sip_header_address_t* contact) ; |
| | | |
| | | |
| | | /** |
| | | * Returns the value of the expires parameter or -1 if no expires parameter was specified or if the parameter value cannot be parsed as an int. |
| | | *@returns value of the expires parameter measured in delta-seconds, O implies removal of Registration specified in Contact Header. |
| | | */ |
| | | * Returns the value of the expires parameter or -1 if no expires parameter was specified or if the parameter value cannot be parsed as an int. |
| | | *@returns value of the expires parameter measured in delta-seconds, O implies removal of Registration specified in Contact Header. |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT int belle_sip_header_contact_get_expires(const belle_sip_header_contact_t* contact); |
| | | /** |
| | | * Returns the value of the q-value parameter of this ContactHeader. The q-value parameter indicates the relative preference amongst a set of locations. q-values are decimal numbers from 0 to 1, with higher values indicating higher preference. |
| | |
| | | */ |
| | | BELLESIP_EXPORT float belle_sip_header_contact_get_qvalue(const belle_sip_header_contact_t* contact); |
| | | /** |
| | | * Returns a boolean value that indicates if the contact header has the format of Contact: *. |
| | | * @return true if this is a wildcard address, false otherwise. |
| | | */ |
| | | * Returns a boolean value that indicates if the contact header has the format of Contact: *. |
| | | * @return true if this is a wildcard address, false otherwise. |
| | | */ |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_contact_is_wildcard(const belle_sip_header_contact_t* contact); |
| | | /** |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT int belle_sip_header_contact_set_expires(belle_sip_header_contact_t* contact, int expires); |
| | | /** |
| | |
| | | BELLESIP_EXPORT int belle_sip_header_contact_set_qvalue(belle_sip_header_contact_t* contact, float qvalue); |
| | | /** |
| | | * Sets a wildcard on this contact address that is "*" is assigned to the contact header so that the header will have the format of Contact: *. |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_header_contact_set_wildcard(belle_sip_header_contact_t* contact,unsigned int is_wildcard); |
| | | |
| | | /** Contact header equality function |
| | | * @return 0 if not equals |
| | | * */ |
| | | * @return 0 if not equals |
| | | * |
| | | * */ |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_contact_equals(const belle_sip_header_contact_t* a,const belle_sip_header_contact_t* b); |
| | | |
| | | /** Contact header equality function, same as #belle_sip_header_contact_equals but return 0 if equals, very useful with #belle_sip_list |
| | | * @return 0 if equals |
| | | * */ |
| | | * @return 0 if equals |
| | | * |
| | | * */ |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_contact_not_equals(const belle_sip_header_contact_t* a,const belle_sip_header_contact_t* b); |
| | | |
| | | /** Contact header equality function |
| | | * @return 0 if not equals |
| | | * */ |
| | | * @return 0 if not equals |
| | | * |
| | | * */ |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_contact_equals_with_uri_omitting(const belle_sip_header_contact_t* a,const belle_sip_header_contact_t* b); |
| | | |
| | | /** Contact header equality function, same as #belle_sip_header_contact_equals but return 0 if equals, very useful with #belle_sip_list |
| | | * @return 0 if equals |
| | | * */ |
| | | * @return 0 if equals |
| | | * |
| | | * */ |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_contact_not_equals_with_uri_omitting(const belle_sip_header_contact_t* a,const belle_sip_header_contact_t* b); |
| | | |
| | | /** |
| | | * Enable automatic filling of the contact ip, port and transport according to the channel that sends this message. |
| | | * @deprecated use belle_sip_header_address_set_automatic(); |
| | | * Enable automatic filling of the contact ip, port and transport according to the channel that sends this message. |
| | | * @deprecated use belle_sip_header_address_set_automatic(); |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_header_contact_set_automatic(belle_sip_header_contact_t *a, int enabled); |
| | | |
| | | BELLESIP_EXPORT int belle_sip_header_contact_get_automatic(const belle_sip_header_contact_t *a); |
| | | |
| | | /** |
| | | * Indicates whether a contact in automatic mode (see belle_sip_header_contact_set_automatic()) could be filled properly when the message was sent. |
| | | * If a message is sent through a connection that has just been initiated, public IP and port are unknown, they will be learned after receiving the first response. |
| | | * This can be used by the upper layer to decide to resubmit the request. |
| | | * Indicates whether a contact in automatic mode (see belle_sip_header_contact_set_automatic()) could be filled properly when the message was sent. |
| | | * If a message is sent through a connection that has just been initiated, public IP and port are unknown, they will be learned after receiving the first response. |
| | | * This can be used by the upper layer to decide to resubmit the request. |
| | | **/ |
| | | BELLESIP_EXPORT int belle_sip_header_contact_is_unknown(const belle_sip_header_contact_t *a); |
| | | |
| | | #define BELLE_SIP_RANDOM_TAG ((const char*)-1) |
| | | #define BELLE_SIP_HEADER_CONTACT(t) BELLE_SIP_CAST(t,belle_sip_header_contact_t) |
| | | #define BELLE_SIP_CONTACT "Contact" |
| | | |
| | | /****************************** |
| | | * From header object inherit from header_address |
| | | /****************************** |
| | | * From header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_from belle_sip_header_from_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_from_t* belle_sip_header_from_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_from_t* belle_sip_header_from_create(const belle_sip_header_address_t* address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_from_t* belle_sip_header_from_create2(const char *address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_from_t* belle_sip_header_from_parse(const char* from) ; |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_from_set_tag(belle_sip_header_from_t* from, const char* tag); |
| | | |
| | | BELLESIP_EXPORT const char* belle_sip_header_from_get_tag(const belle_sip_header_from_t* from); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_from_set_random_tag(belle_sip_header_from_t *obj); |
| | | |
| | | #define BELLE_SIP_HEADER_FROM(t) BELLE_SIP_CAST(t,belle_sip_header_from_t) |
| | | #define BELLE_SIP_FROM "From" |
| | | |
| | | /****************************** |
| | | * To header object inherit from header_address |
| | | /****************************** |
| | | * To header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_to belle_sip_header_to_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_to_t* belle_sip_header_to_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_to_t* belle_sip_header_to_parse(const char* to) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_to_t* belle_sip_header_to_create(const belle_sip_header_address_t *address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_to_t* belle_sip_header_to_create2(const char *address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_to_set_tag(belle_sip_header_to_t* from, const char* tag); |
| | | |
| | | BELLESIP_EXPORT const char* belle_sip_header_to_get_tag(const belle_sip_header_to_t* from); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_to_set_random_tag(belle_sip_header_to_t *obj); |
| | | |
| | | #define BELLE_SIP_HEADER_TO(t) BELLE_SIP_CAST(t,belle_sip_header_to_t) |
| | | #define BELLE_SIP_TO "To" |
| | | |
| | | /****************************** |
| | | * Diversion header object inherit from header_address |
| | | * Diversion header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_diversion belle_sip_header_diversion_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_diversion_t* belle_sip_header_diversion_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_diversion_t* belle_sip_header_diversion_parse(const char* diversion) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_diversion_t* belle_sip_header_diversion_create(const belle_sip_header_address_t *address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_diversion_t* belle_sip_header_diversion_create2(const char *address, const char *tag); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_diversion_set_tag(belle_sip_header_diversion_t* diversion, const char* tag); |
| | | |
| | | BELLESIP_EXPORT const char* belle_sip_header_diversion_get_tag(const belle_sip_header_diversion_t* from); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_diversion_set_random_tag(belle_sip_header_diversion_t *obj); |
| | | |
| | | #define BELLE_SIP_HEADER_DIVERSION(t) BELLE_SIP_CAST(t,belle_sip_header_diversion_t) |
| | | #define BELLE_SIP_DIVERSION "Diversion" |
| | | |
| | | /****************************** |
| | | * Via header object inherit from header_address |
| | | * Via header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_via belle_sip_header_via_t; |
| | | |
| | |
| | | BELLESIP_EXPORT belle_sip_header_via_t* belle_sip_header_via_parse (const char* via) ; |
| | | BELLESIP_EXPORT const char* belle_sip_header_via_get_branch(const belle_sip_header_via_t* via); |
| | | BELLESIP_EXPORT const char* belle_sip_header_via_get_transport(const belle_sip_header_via_t* via); |
| | | |
| | | /** |
| | | * Get lower case version of the transport |
| | | * @return the lower case version of the transport if from tcp,udp,tls or dtls else, return the value from #belle_sip_header_via_get_transport |
| | |
| | | BELLESIP_EXPORT int belle_sip_header_via_set_rport(belle_sip_header_via_t* via,int rport); |
| | | BELLESIP_EXPORT void belle_sip_header_via_set_transport(belle_sip_header_via_t* via,const char* transport); |
| | | BELLESIP_EXPORT int belle_sip_header_via_set_ttl(belle_sip_header_via_t* via, int ttl); |
| | | |
| | | #define BELLE_SIP_HEADER_VIA(t) BELLE_SIP_CAST(t,belle_sip_header_via_t) |
| | | #define BELLE_SIP_VIA "Via" |
| | | |
| | | /****************************** |
| | | * Call id object inherit from object |
| | | * Call id object inherent from object |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_call_id belle_sip_header_call_id_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_call_id_t* belle_sip_header_call_id_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_call_id_t* belle_sip_header_call_id_parse (const char* call_id) ; |
| | | BELLESIP_EXPORT const char* belle_sip_header_call_id_get_call_id(const belle_sip_header_call_id_t* call_id); |
| | | BELLESIP_EXPORT void belle_sip_header_call_id_set_call_id(belle_sip_header_call_id_t* call_id,const char* id); |
| | | unsigned int belle_sip_header_call_id_equals(const belle_sip_header_call_id_t* a,const belle_sip_header_call_id_t* b); |
| | | |
| | | #define BELLE_SIP_HEADER_CALL_ID(t) BELLE_SIP_CAST(t,belle_sip_header_call_id_t) |
| | | #define BELLE_SIP_CALL_ID "Call-ID" |
| | | |
| | | /****************************** |
| | | * Retry-After object inherit from object |
| | | * Retry-After object inherent from object |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_retry_after belle_sip_header_retry_after_t; |
| | | |
| | |
| | | |
| | | #define BELLE_SIP_HEADER_RETRY_AFTER(t) BELLE_SIP_CAST(t,belle_sip_header_retry_after_t) |
| | | #define BELLE_SIP_RETRY_AFTER "Retry-After" |
| | | |
| | | /****************************** |
| | | * cseq object inherit from object |
| | | * cseq object inherent from object |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_cseq belle_sip_header_cseq_t; |
| | | |
| | |
| | | BELLESIP_EXPORT void belle_sip_header_cseq_set_method(belle_sip_header_cseq_t* cseq,const char* method); |
| | | BELLESIP_EXPORT unsigned int belle_sip_header_cseq_get_seq_number(const belle_sip_header_cseq_t* cseq); |
| | | BELLESIP_EXPORT void belle_sip_header_cseq_set_seq_number(belle_sip_header_cseq_t* cseq,unsigned int seq_number); |
| | | |
| | | #define BELLE_SIP_HEADER_CSEQ(t) BELLE_SIP_CAST(t,belle_sip_header_cseq_t) |
| | | #define BELLE_SIP_CSEQ "CSeq" |
| | | |
| | | /****************************** |
| | | * content type object inherit from parameters |
| | | * content type object inherent from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_content_type belle_sip_header_content_type_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_content_type_t* belle_sip_header_content_type_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_content_type_t* belle_sip_header_content_type_parse (const char* content_type) ; |
| | | BELLESIP_EXPORT belle_sip_header_content_type_t* belle_sip_header_content_type_parse (const char* content_type) ; |
| | | BELLESIP_EXPORT belle_sip_header_content_type_t* belle_sip_header_content_type_create (const char* type,const char* sub_type) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_content_type_t* belle_sip_header_content_type_parse (const char* content_type) ; |
| | | BELLESIP_EXPORT const char* belle_sip_header_content_type_get_type(const belle_sip_header_content_type_t* content_type); |
| | | BELLESIP_EXPORT void belle_sip_header_content_type_set_type(belle_sip_header_content_type_t* content_type,const char* type); |
| | | BELLESIP_EXPORT const char* belle_sip_header_content_type_get_subtype(const belle_sip_header_content_type_t* content_type); |
| | | BELLESIP_EXPORT void belle_sip_header_content_type_set_subtype(belle_sip_header_content_type_t* content_type,const char* sub_type); |
| | | |
| | | #define BELLE_SIP_HEADER_CONTENT_TYPE(t) BELLE_SIP_CAST(t,belle_sip_header_content_type_t) |
| | | #define BELLE_SIP_CONTENT_TYPE "Content-Type" |
| | | |
| | | /****************************** |
| | | * Session-Expires inherit from header |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_session_expires belle_sip_header_session_expires_t; |
| | | typedef enum { |
| | | BELLE_SIP_HEADER_SESSION_EXPIRES_UNSPECIFIED, |
| | | BELLE_SIP_HEADER_SESSION_EXPIRES_UAS, |
| | | BELLE_SIP_HEADER_SESSION_EXPIRES_UAC |
| | | } belle_sip_header_session_expires_refresher_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_session_expires_t* belle_sip_header_session_expires_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_session_expires_t* belle_sip_header_session_expires_create( |
| | | int delta, |
| | | belle_sip_header_session_expires_refresher_t refresher |
| | | ); |
| | | BELLESIP_EXPORT belle_sip_header_session_expires_t* belle_sip_header_session_expires_parse (const char* session_expires) ; |
| | | |
| | | BELLESIP_EXPORT int belle_sip_header_session_expires_get_delta(const belle_sip_header_session_expires_t* session_expires); |
| | | BELLESIP_EXPORT void belle_sip_header_session_expires_set_delta(belle_sip_header_session_expires_t* session_expires, int delta); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_session_expires_refresher_t belle_sip_header_session_expires_get_refresher_value( |
| | | const belle_sip_header_session_expires_t* session_expires |
| | | ); |
| | | BELLESIP_EXPORT void belle_sip_header_session_expires_set_refresher_value( |
| | | belle_sip_header_session_expires_t* session_expires, |
| | | belle_sip_header_session_expires_refresher_t refresher |
| | | ); |
| | | |
| | | #define BELLE_SIP_HEADER_SESSION_EXPIRES(t) BELLE_SIP_CAST(t, belle_sip_header_session_expires_t) |
| | | #define BELLE_SIP_SESSION_EXPIRES "Session-Expires" |
| | | #define BELLE_SIP_SESSION_EXPIRES_MSE "Min-SE" |
| | | |
| | | /****************************** |
| | | * |
| | | * Expires inherit from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_expires belle_sip_header_expires_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_expires_t* belle_sip_header_expires_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_expires_t* belle_sip_header_expires_parse (const char* expires) ; |
| | | BELLESIP_EXPORT int belle_sip_header_expires_get_expires(const belle_sip_header_expires_t* expires); |
| | | BELLESIP_EXPORT void belle_sip_header_expires_set_expires(belle_sip_header_expires_t* expires,int value); |
| | | BELLESIP_EXPORT int belle_sip_header_expires_decrement_expires(belle_sip_header_expires_t* expires); |
| | | BELLESIP_EXPORT belle_sip_header_expires_t* belle_sip_header_expires_create(int expires); |
| | | |
| | | #define BELLE_SIP_HEADER_EXPIRES(t) BELLE_SIP_CAST(t,belle_sip_header_expires_t) |
| | | #define BELLE_SIP_EXPIRES "Expires" |
| | | |
| | | /****************************** |
| | | * Route header object inherit from header_address |
| | | * Route header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_route belle_sip_header_route_t; |
| | | |
| | |
| | | |
| | | #define BELLE_SIP_HEADER_ROUTE(t) BELLE_SIP_CAST(t,belle_sip_header_route_t) |
| | | #define BELLE_SIP_ROUTE "Route" |
| | | |
| | | /****************************** |
| | | * Record route header object inherit from header_address |
| | | * Record route header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_record_route belle_sip_header_record_route_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_record_route_t* belle_sip_header_record_route_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_record_route_t* belle_sip_header_record_route_parse (const char* route); |
| | | BELLESIP_EXPORT belle_sip_header_record_route_t* belle_sip_header_record_route_new_auto_outgoing(void); |
| | | |
| | | BELLESIP_EXPORT unsigned char belle_sip_header_record_route_get_auto_outgoing(const belle_sip_header_record_route_t *a); |
| | | |
| | | |
| | | |
| | | #define BELLE_SIP_HEADER_RECORD_ROUTE(t) BELLE_SIP_CAST(t,belle_sip_header_record_route_t) |
| | | #define BELLE_SIP_RECORD_ROUTE "Record-route" |
| | | |
| | | /****************************** |
| | | * Service route header object inherit from header_address |
| | | ******************************/ |
| | | /****************************** |
| | | * Service route header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_service_route belle_sip_header_service_route_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_service_route_t* belle_sip_header_service_route_new(void); |
| | |
| | | |
| | | #define BELLE_SIP_HEADER_SERVICE_ROUTE(t) BELLE_SIP_CAST(t,belle_sip_header_service_route_t) |
| | | #define BELLE_SIP_SERVICE_ROUTE "Service-route" |
| | | |
| | | /****************************** |
| | | * user-Agent header inherit from header |
| | | ******************************/ |
| | | /****************************** |
| | | * |
| | | * user-Agent header inherit from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_user_agent belle_sip_header_user_agent_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_user_agent_t* belle_sip_header_user_agent_new(void); |
| | |
| | | BELLESIP_EXPORT belle_sip_header_user_agent_t* belle_sip_header_user_agent_parse (const char* user_agent) ; |
| | | BELLESIP_EXPORT belle_sip_list_t* belle_sip_header_user_agent_get_products(const belle_sip_header_user_agent_t* user_agent); |
| | | /** |
| | | * concatenates products |
| | | * @param user_agent [in] user agent header |
| | | * @param value [out]buffer where to put result in |
| | | * @param value_size [in] size of the buffer |
| | | * @return number of written characters or -1 inca se of error; |
| | | */ |
| | | * concatenates products |
| | | * @param user_agent [in] user agent header |
| | | * @param value [out]buffer where to put result in |
| | | * @param value_size [in] size of the buffer |
| | | * @return number of written characters or -1 inca se of error; |
| | | */ |
| | | BELLESIP_EXPORT int belle_sip_header_user_agent_get_products_as_string(const belle_sip_header_user_agent_t* user_agent,char* value,unsigned int value_size); |
| | | BELLESIP_EXPORT void belle_sip_header_user_agent_set_products(belle_sip_header_user_agent_t* user_agent,belle_sip_list_t* value); |
| | | BELLESIP_EXPORT void belle_sip_header_user_agent_add_product(belle_sip_header_user_agent_t* user_agent,const char* product); |
| | | #define BELLE_SIP_HEADER_USER_AGENT(t) BELLE_SIP_CAST(t,belle_sip_header_user_agent_t) |
| | | #define BELLE_SIP_USER_AGENT "User-Agent" |
| | | |
| | | /****************************** |
| | | * Content length inherit from object |
| | | /****************************** |
| | | * Content length inherent from object |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_content_length belle_sip_header_content_length_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_content_length_t* belle_sip_header_content_length_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_content_length_t* belle_sip_header_content_length_parse (const char* content_length) ; |
| | | BELLESIP_EXPORT belle_sip_header_content_length_t* belle_sip_header_content_length_create (size_t content_length) ; |
| | | BELLESIP_EXPORT size_t belle_sip_header_content_length_get_content_length(const belle_sip_header_content_length_t* content_length); |
| | | BELLESIP_EXPORT void belle_sip_header_content_length_set_content_length(belle_sip_header_content_length_t* content_length,size_t length); |
| | | |
| | | #define BELLE_SIP_HEADER_CONTENT_LENGTH(t) BELLE_SIP_CAST(t,belle_sip_header_content_length_t) |
| | | #define BELLE_SIP_CONTENT_LENGTH "Content-Length" |
| | | |
| | | /****************************** |
| | | * authorization header inherit from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_authorization belle_sip_header_authorization_t; |
| | | |
| | |
| | | |
| | | /******************************* |
| | | * proxy_authorization inherit from Authorization |
| | | *******************************/ |
| | | */ |
| | | typedef struct _belle_sip_header_proxy_authorization belle_sip_header_proxy_authorization_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_proxy_authorization_t* belle_sip_header_proxy_authorization_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_proxy_authorization_t* belle_sip_header_proxy_authorization_parse(const char* proxy_authorization); |
| | | |
| | | #define BELLE_SIP_HEADER_PROXY_AUTHORIZATION(t) BELLE_SIP_CAST(t,belle_sip_header_proxy_authorization_t) |
| | | #define BELLE_SIP_PROXY_AUTHORIZATION "Proxy-Authorization" |
| | | |
| | | /******************************* |
| | | * http_authorization inherit from Authorization |
| | | *******************************/ |
| | | */ |
| | | typedef struct _belle_http_header_authorization belle_http_header_authorization_t; |
| | | |
| | | BELLESIP_EXPORT belle_http_header_authorization_t* belle_http_header_authorization_new(void); |
| | | /*cannot be parsed for now |
| | | BELLESIP_EXPORT belle_http_header_authorization_t* belle_http_header_authorization_parse(const char* proxy_authorization); |
| | | */ |
| | | BELLESIP_EXPORT void belle_http_header_authorization_set_uri(belle_http_header_authorization_t* authorization, belle_generic_uri_t* uri); |
| | | BELLESIP_EXPORT belle_generic_uri_t* belle_http_header_authorization_get_uri(const belle_http_header_authorization_t* authorization); |
| | | |
| | | #define BELLE_HTTP_HEADER_AUTHORIZATION(t) BELLE_SIP_CAST(t,belle_http_header_authorization_t) |
| | | #define BELLE_HTTP_AUTHORIZATION "Authorization" |
| | | |
| | | |
| | | /******************************* |
| | | * www_authenticate inherit from parameters |
| | | *******************************/ |
| | | */ |
| | | typedef struct _belle_sip_header_www_authenticate belle_sip_header_www_authenticate_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_www_authenticate_t* belle_sip_header_www_authenticate_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_www_authenticate_t* belle_sip_header_www_authenticate_parse(const char* www_authenticate); |
| | | BELLESIP_EXPORT const char* belle_sip_header_www_authenticate_get_algorithm(const belle_sip_header_www_authenticate_t* www_authenticate ); |
| | |
| | | BELLESIP_EXPORT void belle_sip_header_www_authenticate_set_scheme(belle_sip_header_www_authenticate_t* www_authenticate, const char* scheme); |
| | | BELLESIP_EXPORT void belle_sip_header_www_authenticate_set_domain(belle_sip_header_www_authenticate_t* www_authenticate,const char* domain); |
| | | BELLESIP_EXPORT void belle_sip_header_www_authenticate_set_stale(belle_sip_header_www_authenticate_t* www_authenticate, unsigned int enable); |
| | | |
| | | #define BELLE_SIP_HEADER_WWW_AUTHENTICATE(t) BELLE_SIP_CAST(t,belle_sip_header_www_authenticate_t) |
| | | #define BELLE_SIP_WWW_AUTHENTICATE "WWW-Authenticate" |
| | | |
| | | /******************************* |
| | | * proxy_authenticate inherit from www_authenticate |
| | | *******************************/ |
| | | */ |
| | | typedef struct _belle_sip_header_proxy_authenticate belle_sip_header_proxy_authenticate_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_proxy_authenticate_t* belle_sip_header_proxy_authenticate_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_proxy_authenticate_t* belle_sip_header_proxy_authenticate_parse(const char* proxy_authenticate); |
| | | |
| | | #define BELLE_SIP_HEADER_PROXY_AUTHENTICATE(t) BELLE_SIP_CAST(t,belle_sip_header_proxy_authenticate_t) |
| | | #define BELLE_SIP_PROXY_AUTHENTICATE "Proxy-Authenticate" |
| | | |
| | | /****************************** |
| | | * |
| | | * Max forward inherit from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_max_forwards belle_sip_header_max_forwards_t; |
| | | |
| | |
| | | #define BELLE_SIP_MAX_FORWARDS "Max-Forwards" |
| | | |
| | | /****************************** |
| | | * |
| | | * Subscription state inherit from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_subscription_state belle_sip_header_subscription_state_t; |
| | | |
| | |
| | | BELLESIP_EXPORT void belle_sip_header_subscription_state_set_reason(belle_sip_header_subscription_state_t* subscription_state, const char* reason); |
| | | BELLESIP_EXPORT void belle_sip_header_subscription_state_set_retry_after(belle_sip_header_subscription_state_t* subscription_state, int retry_after ); |
| | | |
| | | |
| | | #define BELLE_SIP_HEADER_SUBSCRIPTION_STATE(t) BELLE_SIP_CAST(t,belle_sip_header_subscription_state_t) |
| | | #define BELLE_SIP_SUBSCRIPTION_STATE "Subscription-State" |
| | | #define BELLE_SIP_SUBSCRIPTION_STATE_ACTIVE "active" |
| | |
| | | |
| | | /****************************** |
| | | * Refer-To header object inherits from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_refer_to belle_sip_header_refer_to_t; |
| | | BELLESIP_EXPORT belle_sip_header_refer_to_t* belle_sip_header_refer_to_new(void); |
| | |
| | | #define BELLE_SIP_REFER_TO "Refer-To" |
| | | |
| | | /****************************** |
| | | * Referred-by header object inherits from header_address |
| | | ******************************/ |
| | | * Referred-by header object inherits from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_referred_by belle_sip_header_referred_by_t; |
| | | BELLESIP_EXPORT belle_sip_header_referred_by_t* belle_sip_header_referred_by_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_referred_by_t* belle_sip_header_referred_by_parse(const char* referred_by) ; |
| | |
| | | #define BELLE_SIP_REFERRED_BY "Referred-By" |
| | | |
| | | /****************************** |
| | | * Replace header object inherits from parameters |
| | | ******************************/ |
| | | * Replace header object inherits from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_replaces belle_sip_header_replaces_t; |
| | | BELLESIP_EXPORT belle_sip_header_replaces_t* belle_sip_header_replaces_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_replaces_t* belle_sip_header_replaces_parse(const char* replaces) ; |
| | |
| | | #define BELLE_SIP_HEADER_REPLACES(t) BELLE_SIP_CAST(t,belle_sip_header_replaces_t) |
| | | #define BELLE_SIP_REPLACES "Replaces" |
| | | |
| | | /****************************** |
| | | /******* |
| | | * Date header |
| | | ******************************/ |
| | | *******/ |
| | | |
| | | typedef struct belle_sip_header_date belle_sip_header_date_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_date_t* belle_sip_header_date_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_date_t* belle_sip_header_date_parse(const char* date) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_date_t* belle_sip_header_date_create_from_time(const time_t *utc_time); |
| | | |
| | | BELLESIP_EXPORT time_t belle_sip_header_date_get_time(belle_sip_header_date_t *obj); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_date_set_time(belle_sip_header_date_t *obj, const time_t *utc_time); |
| | | |
| | | BELLESIP_EXPORT const char * belle_sip_header_date_get_date(const belle_sip_header_date_t *obj); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_date_set_date(belle_sip_header_date_t *obj, const char *date); |
| | | |
| | | #define BELLE_SIP_HEADER_DATE(obj) BELLE_SIP_CAST(obj,belle_sip_header_date_t) |
| | | #define BELLE_SIP_DATE "Date" |
| | | |
| | | /****************************** |
| | | * P-Preferred-Identity header object inherit from header_address |
| | | * P-Preferred-Identity header object inherent from header_address |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_p_preferred_identity belle_sip_header_p_preferred_identity_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_p_preferred_identity_t* belle_sip_header_p_preferred_identity_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_p_preferred_identity_t* belle_sip_header_p_preferred_identity_parse(const char* p_preferred_identity) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_p_preferred_identity_t* belle_sip_header_p_preferred_identity_create(const belle_sip_header_address_t *address); |
| | | |
| | | #define BELLE_SIP_HEADER_P_PREFERRED_IDENTITY(t) BELLE_SIP_CAST(t,belle_sip_header_p_preferred_identity_t) |
| | | #define BELLE_SIP_P_PREFERRED_IDENTITY "P-Preferred-Identity" |
| | | |
| | | /****************************** |
| | | * Privacy header object inherit from header |
| | | * Privacy header object inherent from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_privacy belle_sip_header_privacy_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_privacy_t* belle_sip_header_privacy_new(void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_privacy_t* belle_sip_header_privacy_parse(const char* privacy) ; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_privacy_t* belle_sip_header_privacy_create(const char* privacy); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_privacy_add_privacy(belle_sip_header_privacy_t* privacy, const char* value); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_privacy_set_privacy(belle_sip_header_privacy_t* privacy, belle_sip_list_t* privacy_values); |
| | | |
| | | BELLESIP_EXPORT belle_sip_list_t* belle_sip_header_privacy_get_privacy(const belle_sip_header_privacy_t* privacy); |
| | | |
| | | |
| | | #define BELLE_SIP_HEADER_PRIVACY(t) BELLE_SIP_CAST(t,belle_sip_header_privacy_t) |
| | | #define BELLE_SIP_PRIVACY "Privacy" |
| | | |
| | | |
| | | /****************************** |
| | | * Event header object inherit from parameters |
| | | * Event header object inherent from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_event belle_sip_header_event_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_event_t* belle_sip_header_event_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_event_t* belle_sip_header_event_parse(const char* event) ; |
| | | BELLESIP_EXPORT belle_sip_header_event_t* belle_sip_header_event_create(const char* event); |
| | | BELLESIP_EXPORT const char* belle_sip_header_event_get_package_name(const belle_sip_header_event_t* event); |
| | | BELLESIP_EXPORT void belle_sip_header_event_set_package_name(belle_sip_header_event_t* event, const char* package_name); |
| | | BELLESIP_EXPORT const char* belle_sip_header_event_get_id(const belle_sip_header_event_t* event); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_header_event_set_id(belle_sip_header_event_t* event, const char* id); |
| | | #define BELLE_SIP_HEADER_EVENT(t) BELLE_SIP_CAST(t,belle_sip_header_event_t) |
| | | #define BELLE_SIP_EVENT "Event" |
| | | |
| | | |
| | | /****************************** |
| | | * Supported header object inherit from header |
| | | * Supported header object inherent from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_supported belle_sip_header_supported_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_supported_t* belle_sip_header_supported_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_supported_t* belle_sip_header_supported_parse(const char* supported) ; |
| | | BELLESIP_EXPORT belle_sip_header_supported_t* belle_sip_header_supported_create(const char* supported); |
| | | BELLESIP_EXPORT void belle_sip_header_supported_add_supported(belle_sip_header_supported_t* supported, const char* value); |
| | | BELLESIP_EXPORT void belle_sip_header_supported_set_supported(belle_sip_header_supported_t* supported, belle_sip_list_t* supported_values); |
| | | BELLESIP_EXPORT belle_sip_list_t* belle_sip_header_supported_get_supported(const belle_sip_header_supported_t* supported); |
| | | |
| | | #define BELLE_SIP_HEADER_SUPPORTED(t) BELLE_SIP_CAST(t,belle_sip_header_supported_t) |
| | | #define BELLE_SIP_SUPPORTED "Supported" |
| | | |
| | | /****************************** |
| | | * Require header object inherit from header |
| | | ******************************/ |
| | | * Require header object inherent from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_require belle_sip_header_require_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_require_t* belle_sip_header_require_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_require_t* belle_sip_header_require_parse(const char* require) ; |
| | | BELLESIP_EXPORT belle_sip_header_require_t* belle_sip_header_require_create(const char* require); |
| | | BELLESIP_EXPORT void belle_sip_header_require_add_require(belle_sip_header_require_t* require, const char* value); |
| | | BELLESIP_EXPORT void belle_sip_header_require_set_require(belle_sip_header_require_t* require, belle_sip_list_t* require_values); |
| | | BELLESIP_EXPORT belle_sip_list_t* belle_sip_header_require_get_require(const belle_sip_header_require_t* require); |
| | | |
| | | #define BELLE_SIP_HEADER_REQUIRE(t) BELLE_SIP_CAST(t,belle_sip_header_require_t) |
| | | #define BELLE_SIP_REQUIRE "Require" |
| | | |
| | | /****************************** |
| | | * Content Disposition header object inherit from header |
| | | * Content Disposition header object inherent from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_content_disposition belle_sip_header_content_disposition_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_content_disposition_t* belle_sip_header_content_disposition_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_content_disposition_t* belle_sip_header_content_disposition_parse (const char* content_disposition) ; |
| | | BELLESIP_EXPORT belle_sip_header_content_disposition_t* belle_sip_header_content_disposition_create (const char* content_disposition); |
| | | BELLESIP_EXPORT const char* belle_sip_header_content_disposition_get_content_disposition(const belle_sip_header_content_disposition_t* content_disposition); |
| | | BELLESIP_EXPORT void belle_sip_header_content_disposition_set_content_disposition(belle_sip_header_content_disposition_t* obj,const char* content_disposition); |
| | | |
| | | #define BELLE_SIP_HEADER_CONTENT_DISPOSITION(t) BELLE_SIP_CAST(t,belle_sip_header_content_disposition_t) |
| | | #define BELLE_SIP_CONTENT_DISPOSITION "Content-Disposition" |
| | | |
| | | /****************************** |
| | | * Accept header object inherit from parameters |
| | | * Accept header object inherent from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_accept belle_sip_header_accept_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_accept_t* belle_sip_header_accept_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_accept_t* belle_sip_header_accept_parse (const char* accept) ; |
| | | BELLESIP_EXPORT belle_sip_header_accept_t* belle_sip_header_accept_create (const char* type,const char* sub_type) ; |
| | |
| | | BELLESIP_EXPORT const char* belle_sip_header_accept_get_subtype(const belle_sip_header_accept_t* accept); |
| | | BELLESIP_EXPORT void belle_sip_header_accept_set_subtype(belle_sip_header_accept_t* accept,const char* sub_type); |
| | | #define BELLE_SIP_HEADER_ACCEPT(t) BELLE_SIP_CAST(t,belle_sip_header_accept_t) |
| | | |
| | | #define BELLE_SIP_ACCEPT "Accept" |
| | | |
| | | /****************************** |
| | | * Reason header object inherit from parameters |
| | | * Reason header object inherent from parameters |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_reason belle_sip_header_reason_t; |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_reason_t* belle_sip_header_reason_new(void); |
| | | BELLESIP_EXPORT belle_sip_header_reason_t* belle_sip_header_reason_parse (const char* reason) ; |
| | | BELLESIP_EXPORT const char* belle_sip_header_reason_get_protocol(const belle_sip_header_reason_t* reason); |
| | |
| | | #define BELLE_SIP_HEADER_REASON(t) BELLE_SIP_CAST(t,belle_sip_header_reason_t) |
| | | #define BELLE_SIP_REASON "Reason" |
| | | |
| | | |
| | | /****************************** |
| | | * Authentication-Info header inherit from header |
| | | * |
| | | ******************************/ |
| | | typedef struct _belle_sip_header_authentication_info belle_sip_header_authentication_info_t; |
| | | |
| | |
| | | BELLESIP_EXPORT void belle_sip_header_authentication_info_set_nonce_count(belle_sip_header_authentication_info_t* authentication_info, int nonceCount); |
| | | BELLESIP_EXPORT int belle_sip_header_authentication_info_get_nonce_count(const belle_sip_header_authentication_info_t* authentication_info); |
| | | |
| | | |
| | | #define BELLE_SIP_HEADER_AUTHENTICATION_INFO(t) BELLE_SIP_CAST(t,belle_sip_header_authentication_info_t) |
| | | #define BELLE_SIP_AUTHENTICATION_INFO "Authentication-Info" |
| | | |
| | | BELLE_SIP_END_DECLS |
| | | |
| | | |
| | | #endif /* HEADERS_H_ */ |
| | |
| | | #ifndef BELLE_SIP_MAINLOOP_H |
| | | #define BELLE_SIP_MAINLOOP_H |
| | | |
| | | #include "defs.h" |
| | | #include "utils.h" |
| | | #include "types.h" |
| | | |
| | | #define BELLE_SIP_EVENT_READ 1 |
| | | #define BELLE_SIP_EVENT_WRITE (1<<1) |
| | | #define BELLE_SIP_EVENT_ERROR (1<<2) |
| | |
| | | |
| | | /** |
| | | * Schedule an arbitrary task at next main loop iteration. |
| | | * @note thread-safe |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_main_loop_do_later(belle_sip_main_loop_t *ml, belle_sip_callback_t func, void *data); |
| | | |
| | | /** |
| | | * Same as #belle_sip_main_loop_do_later() but allow to give a name to the task. |
| | | * @param[in] timer_name The name of the task. If NULL, the task will be named as though |
| | | * #belle_sip_main_loop_do_later() was called. |
| | | * @note thread-safe |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_main_loop_do_later_with_name( |
| | | belle_sip_main_loop_t *ml, |
| | | belle_sip_callback_t func, |
| | | void *data, |
| | | const char *timer_name |
| | | ); |
| | | |
| | | /** |
| | | * Creates a timeout source, similarly to belle_sip_main_loop_add_timeout(). |
| | |
| | | **/ |
| | | BELLESIP_EXPORT belle_sip_source_t * belle_sip_timeout_source_new(belle_sip_source_func_t func, void *data, unsigned int timeout_value_ms); |
| | | |
| | | /** |
| | | * Set the timeout duration. |
| | | * @param[in] s The source to modify. |
| | | * @param[in] value_ms The new timeout duration in milliseconds. Only values in [0;INT_MAX] are valid to define a new |
| | | * duration. Higher values will cause the timer to be disabled. |
| | | * @deprecated Since 2020-05-20 (SDK 4.4). Use belle_sip_source_set_timeout_int64() instead. |
| | | */ |
| | | BELLESIP_DEPRECATED BELLESIP_EXPORT void belle_sip_source_set_timeout(belle_sip_source_t *s, unsigned int value_ms); |
| | | /** |
| | | * Set the timeout duration. |
| | | * @param[in] s The source to modify. |
| | | * @param[in] value_ms Positive values willbe taken as the new duration to set. Negative values will cause the timer |
| | | * to be disabled. |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_source_set_timeout_int64(belle_sip_source_t *s, int64_t value_ms); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_source_set_timeout(belle_sip_source_t *s, unsigned int value_ms); |
| | | /** |
| | | * Cancel a source. Will be removed at next iterate. It is not freed. |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_source_cancel(belle_sip_source_t * src); |
| | | |
| | | |
| | | BELLESIP_DEPRECATED BELLESIP_EXPORT unsigned int belle_sip_source_get_timeout(const belle_sip_source_t *s); |
| | | BELLESIP_EXPORT int64_t belle_sip_source_get_timeout_int64(const belle_sip_source_t *s); |
| | | BELLESIP_EXPORT unsigned int belle_sip_source_get_timeout(const belle_sip_source_t *s); |
| | | |
| | | BELLESIP_EXPORT belle_sip_source_t * belle_sip_socket_source_new(belle_sip_source_func_t func, void *data, belle_sip_socket_t fd, unsigned int events, unsigned int timeout_value_ms); |
| | | /* |
| | |
| | | BELLESIP_EXPORT void belle_sip_main_loop_cancel_source(belle_sip_main_loop_t *ml, unsigned long id); |
| | | |
| | | BELLE_SIP_END_DECLS |
| | | #ifndef BELLE_SIP_USE_STL |
| | | #define BELLE_SIP_USE_STL 1 |
| | | #endif |
| | | |
| | | #if (defined(WIN32) && defined(__cplusplus)) || __cplusplus >= 201103L |
| | | #if ((defined(WIN32) && defined(__cplusplus)) || __cplusplus >= 201103L) && BELLE_SIP_USE_STL |
| | | /*Only Visual Studio 2018 properly defines __cplusplus according to c++ level. */ |
| | | |
| | | #include <functional> |
| | | #include <memory> |
| | | |
| | | /** |
| | | * A generic deleter for belle_sip_object_t objects that limits itself to decrementing the |
| | | * reference counter. This class is to be used by std::unique_ptr and std::shared_ptr maybe. |
| | | */ |
| | | template <typename T> |
| | | struct BelleSipObjectDeleter { |
| | | constexpr BelleSipObjectDeleter() noexcept = default; |
| | | void operator()(T *ptr) const noexcept {belle_sip_object_unref(ptr);} |
| | | }; |
| | | typedef std::function<int (unsigned int)> belle_sip_source_cpp_func_t; |
| | | |
| | | using BelleSipSourcePtr = std::unique_ptr<belle_sip_source_t, BelleSipObjectDeleter<belle_sip_source_t>>; |
| | | using belle_sip_source_cpp_func_t = std::function<int(unsigned int)>; |
| | | using BelleSipDoLaterFunc = std::function<void()>; |
| | | |
| | | /** |
| | | * The purpose of this function is to simplify c++ timer integration. |
| | | /*purpose of this function is to simplify c++ timer integration. |
| | | * ex: |
| | | * std::string helloworld("Hello world): |
| | | * belle_sip_source_cpp_func_t *func = new belle_sip_source_cpp_func_t([helloworld](unsigned int events) { |
| | | * std::cout << helloworld << std::endl; |
| | | * return BELLE_SIP_STOP; |
| | | * }); |
| | | * // create timer |
| | | * belle_sip_source_t *timer = belle_sip_main_loop_create_cpp_timeout( mainloop |
| | | *create timer |
| | | *mTimer = belle_sip_main_loop_create_cpp_timeout( mainloop |
| | | * , func |
| | | * , 1000 |
| | | * ,"timer for c++"); |
| | | * [...] |
| | | * // Unref the timer when you doesn't need it anymore |
| | | * belle_sip_object_unref(timer); |
| | | * |
| | | * @warning Not thread-sfae |
| | | * @deprecated Since 2020-04-17. |
| | | */ |
| | | BELLESIP_DEPRECATED BELLESIP_EXPORT belle_sip_source_t *belle_sip_main_loop_create_cpp_timeout(belle_sip_main_loop_t *ml |
| | | |
| | | BELLESIP_EXPORT belle_sip_source_t * belle_sip_main_loop_create_cpp_timeout(belle_sip_main_loop_t *ml |
| | | , belle_sip_source_cpp_func_t *func |
| | | , unsigned int timeout_value_ms |
| | | , const char* timer_name); |
| | | |
| | | /* |
| | | * This variant does the same except that: |
| | | * - it does not require to pass the std::function as a pointer allocated with new() |
| | | * - the std::function shall return true/false instead of BELLE_SIP_CONTINUE/BELLE_SIP_STOP. |
| | | */ |
| | | BELLESIP_EXPORT belle_sip_source_t * belle_sip_main_loop_create_cpp_timeout_2(belle_sip_main_loop_t *ml, |
| | | const std::function<bool ()> &func, |
| | | unsigned int timeout_value_ms, |
| | | const std::string &timer_name); |
| | | |
| | | /** |
| | | * The purpose of this function is to simplify c++ timer integration. |
| | | * Unlike the deprecated overload of this function, there is no need to |
| | | * allocate anything with new and to unref the timer. |
| | | * |
| | | * ex: |
| | | * std::string helloworld{"Hello world}; |
| | | * auto func = [helloworld](unsigned int events) { |
| | | * std::cout << helloworld << std::endl; |
| | | * return BELLE_SIP_STOP; |
| | | * }); |
| | | * |
| | | * // create the timer |
| | | * auto timer = belle_sip_main_loop_create_cpp_timeout( mainloop |
| | | * , func |
| | | * , 1000 |
| | | * ,"timer for c++"); |
| | | * |
| | | */ |
| | | BELLESIP_EXPORT BelleSipSourcePtr belle_sip_main_loop_create_cpp_timeout(belle_sip_main_loop_t *ml |
| | | , const belle_sip_source_cpp_func_t &func |
| | | , unsigned int timeout_value_ms |
| | | , const char* timer_name); |
| | | |
| | | /** |
| | | * C++ wrapper for #belle_sip_main_loop_do_later(). |
| | | * @note thread-safe |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_main_loop_cpp_do_later(belle_sip_main_loop_t *ml, const BelleSipDoLaterFunc &func); |
| | | |
| | | /** |
| | | * Overload of the previous function that allow to give a name to the task. |
| | | * @note thread-safe |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_main_loop_cpp_do_later( |
| | | belle_sip_main_loop_t *ml, |
| | | const BelleSipDoLaterFunc &func, |
| | | const char *task_name |
| | | ); |
| | | BELLESIP_EXPORT void belle_sip_main_loop_cpp_do_later(belle_sip_main_loop_t *ml, const std::function<void (void)> &func); |
| | | |
| | | |
| | | #endif // C++ declarations |
| | | #endif |
| | | |
| | | #endif // #ifndef BELLE_SIP_MAINLOOP_H |
| | | #endif |
| | |
| | | BELLESIP_EXPORT belle_sip_message_t* belle_sip_message_parse_raw (const char* buff, size_t buff_length,size_t* message_length ); |
| | | |
| | | |
| | | |
| | | BELLESIP_EXPORT int belle_sip_message_is_request(belle_sip_message_t *msg); |
| | | BELLESIP_EXPORT belle_sip_request_t* belle_sip_request_new(void); |
| | | BELLESIP_EXPORT belle_sip_request_t* belle_sip_request_parse(const char* raw); |
| | |
| | | belle_sip_header_to_t *to, |
| | | belle_sip_header_via_t *via, |
| | | int max_forwards); |
| | | |
| | | |
| | | |
| | | |
| | | BELLESIP_EXPORT belle_sip_uri_t* belle_sip_request_get_uri(const belle_sip_request_t* request); |
| | |
| | | */ |
| | | BELLESIP_EXPORT void belle_sip_request_set_absolute_uri(belle_sip_request_t* req, belle_generic_uri_t* uri); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | BELLESIP_EXPORT int belle_sip_message_is_response(const belle_sip_message_t *msg); |
| | | |
| | | BELLESIP_EXPORT belle_sip_header_t *belle_sip_message_get_header(const belle_sip_message_t *msg, const char *header_name); |
| | | BELLESIP_EXPORT int belle_sip_header_supported_contains_tag(const belle_sip_header_supported_t* supported, const char* tag); |
| | | |
| | | BELLESIP_EXPORT belle_sip_object_t *_belle_sip_message_get_header_by_type_id(const belle_sip_message_t *message, belle_sip_type_id_t id); |
| | | |
| | |
| | | //Obtain a shared_ptr from the C++ object. |
| | | std::shared_ptr<_CppType> getSharedFromThis() { |
| | | this->ref(); |
| | | return std::shared_ptr<_CppType>(static_cast<_CppType *>(this), std::mem_fn(&Object::unref)); |
| | | return std::shared_ptr<_CppType>(static_cast<_CppType *>(this), std::mem_fun(&Object::unref)); |
| | | } |
| | | //Obtain a shared_ptr from the C++ object in the const case. |
| | | std::shared_ptr<const _CppType> getSharedFromThis () const { |
| | | this->ref(); |
| | | return std::shared_ptr<const _CppType>(static_cast<const _CppType *>(this), std::mem_fn(&HybridObject<_CType,_CppType>::constUnref)); |
| | | return std::shared_ptr<const _CppType>(static_cast<const _CppType *>(this), std::mem_fun(&HybridObject<_CType,_CppType>::constUnref)); |
| | | } |
| | | //Convenience method for easy CType -> shared_ptr<CppType> conversion |
| | | static std::shared_ptr<_CppType> getSharedFromThis(_CType *ptr) { |
| | |
| | | // by clone() method. |
| | | // There should be NO const variant of this method. |
| | | std::shared_ptr<_CppType> toSharedPtr(){ |
| | | return std::shared_ptr<_CppType>(static_cast<_CppType *>(this), std::mem_fn(&Object::unref)); |
| | | return std::shared_ptr<_CppType>(static_cast<_CppType *>(this), std::mem_fun(&Object::unref)); |
| | | } |
| | | |
| | | //Convenience method for easy bctbx_list(_Ctype) -> std::list<_CppType> conversion |
| | | //It does not take ownership of the hybrid object, but takes a ref. |
| | | static std::list<std::shared_ptr<_CppType>> getCppListFromCList(const bctbx_list_t *cList) { |
| | | std::list<std::shared_ptr<_CppType>> result; |
| | | for (auto it = cList; it != nullptr; it = bctbx_list_next(it)) |
| | | result.push_back(toCpp(static_cast<_CType>(bctbx_list_get_data(it)))->getSharedFromThis() ); |
| | | static std::list<_CppType> getCppListFromCList(const bctbx_list_t *cList) { |
| | | std::list<_CppType> result; |
| | | for (auto it = cList; it; it = bctbx_list_next(it)) |
| | | result.push_back(toCpp(static_cast<_CType>(bctbx_list_get_data(it)))); |
| | | return result; |
| | | } |
| | | //Convenience method for easy bctbx_list(_Ctype) -> std::list<_CppType> conversion |
| | | //Applies 'func' to get _CppType from _CType. Used in case we do not want to call `toCpp` on _Ctype |
| | | static std::list<std::shared_ptr<_CppType>> getCppListFromCList(const bctbx_list_t *cList, const std::function<std::shared_ptr<_CppType> (_CType *)> &func) { |
| | | std::list<std::shared_ptr<_CppType>> result; |
| | | for (auto it = cList; it != nullptr; it = bctbx_list_next(it)) |
| | | result.push_back(func(static_cast<_CType*>(bctbx_list_get_data(it)))); |
| | | static std::list<_CppType> getCppListFromCList(const bctbx_list_t *cList, const std::function<_CppType (_CType)> &func) { |
| | | std::list<_CppType> result; |
| | | for (auto it = cList; it; it = bctbx_list_next(it)) |
| | | result.push_back(func(static_cast<_CType>(bctbx_list_get_data(it)))); |
| | | return result; |
| | | } |
| | | //Convenience method for easy std::list<shared_ptr<CppType>> -> bctbx_list(CType) conversion |
| | | //It does not take ownership of the hybrid object, but takes a ref. |
| | | static bctbx_list_t* getCListFromCppList(const std::list<std::shared_ptr<_CppType> > &cppList) { |
| | | bctbx_list_t *result = nullptr; |
| | | for (auto it = cppList.begin(); it != cppList.end(); it++) { |
| | | std::shared_ptr<_CppType> cppPtr = static_cast<std::shared_ptr<_CppType>>(*it); |
| | | cppPtr->ref(); |
| | | _CType *cptr = cppPtr->toC(); |
| | | result = bctbx_list_append(result, cptr); |
| | | } |
| | | return result; |
| | | } |
| | | //Convenience method for easy std::list<CppType*> -> bctbx_list(CType) conversion |
| | | //It does not take ownership of the hybrid object, but takes a ref. |
| | | static bctbx_list_t* getCListFromCppList(const std::list<_CppType*> &cppList) { |
| | | bctbx_list_t *result = nullptr; |
| | | for (auto it = cppList.begin(); it != cppList.end(); it++) { |
| | | _CppType *cppPtr = static_cast<_CppType*>(*it); |
| | | cppPtr->ref(); |
| | | _CType *cptr = cppPtr->toC(); |
| | | result = bctbx_list_append(result, cptr); |
| | |
| | | |
| | | BELLE_SIP_BEGIN_DECLS |
| | | |
| | | /** |
| | | * This only affects the resolution of SIP URI in absence of port number, and in absence of SRV record for the SIP domain. The well known ports (udp/tcp and tls/dtls) are static. |
| | | * @param well known port value |
| | | **/ |
| | | BELLESIP_EXPORT void belle_sip_stack_set_well_known_port (int value); |
| | | |
| | | BELLESIP_EXPORT void belle_sip_stack_set_well_known_port_tls (int value); |
| | | |
| | | |
| | | BELLESIP_EXPORT int belle_sip_stack_get_well_known_port (void); |
| | | |
| | | BELLESIP_EXPORT int belle_sip_stack_get_well_known_port_tls (void); |
| | | |
| | | BELLESIP_EXPORT belle_sip_stack_t * belle_sip_stack_new(const char *properties); |
| | | |
| | | BELLESIP_EXPORT belle_sip_listening_point_t *belle_sip_stack_create_listening_point(belle_sip_stack_t *s, const char *ipaddress, int port, const char *transport); |
| | |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_call_id_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_cseq_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_content_type_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_session_expires_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_route_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_record_route_t), |
| | | BELLE_SIP_TYPE_ID(belle_sip_header_user_agent_t), |
| | |
| | | */ |
| | | BELLESIP_EXPORT int belle_sip_mkdir(const char *path); |
| | | |
| | | BELLESIP_EXPORT char* belle_sip_uri_to_escaped_username(const char* buff); |
| | | BELLESIP_EXPORT char* belle_sip_to_unescaped_string(const char* buff); |
| | | |
| | | BELLE_SIP_END_DECLS |
| | | |
| | | #endif |
| | |
| | | lime::PeerDeviceStatus get_peerDeviceStatus(const std::string &peerDeviceId); |
| | | |
| | | /** |
| | | * @brief checks if a device iD exists in the local users |
| | | * |
| | | * @param[in] deviceId The device Id to check |
| | | * |
| | | * @return true if the device Id exists in the local users table, false otherwise |
| | | */ |
| | | bool is_localUser(const std::string &deviceId); |
| | | |
| | | /** |
| | | * @brief delete a peerDevice from local storage |
| | | * |
| | | * @param[in] peerDeviceId The device Id to be removed from local storage, shall be its GRUU |
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_update_account(LinphoneAccountCreator *creator); |
| | | |
| | | /** |
| | | * Send a request to get the password & algorithm of an account using the confirmation key |
| | | * @param[in] creator #LinphoneAccountCreator object |
| | | * @return #LinphoneAccountCreatorStatusRequestOk if everything is OK, or a specific error otherwise. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorStatus linphone_account_creator_login_linphone_account(LinphoneAccountCreator *creator); |
| | | |
| | | /** |
| | | * Acquire a reference to the LinphoneAccountCreator. |
| | | * @param[in] creator #LinphoneAccountCreator object. |
| | | * @return The same #LinphoneAccountCreator object. |
| | |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorLanguageStatus linphone_account_creator_set_language(LinphoneAccountCreator *creator, const char *lang); |
| | | |
| | | /** |
| | | * Get the language use in email of SMS. |
| | | * @param[in] creator #LinphoneAccountCreator object |
| | | * @return The language of the #LinphoneAccountCreator |
| | | **/ |
| | | LINPHONE_PUBLIC const char * linphone_account_creator_get_language(const LinphoneAccountCreator *creator); |
| | | |
| | | /** |
| | | * Set the supported algorithm. |
| | | * @param[in] creator LinphoneAccountCreator object |
| | | * @param[in] algorithm The algorithm to use |
| | |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorAlgoStatus linphone_account_creator_set_algorithm(LinphoneAccountCreator *creator, const char *algorithm); |
| | | |
| | | /** |
| | | * Get the algorithm configured in the account creator. |
| | | * Get the language use in email of SMS. |
| | | * @param[in] creator #LinphoneAccountCreator object |
| | | * @return The algorithm of the #LinphoneAccountCreator |
| | | * @return The language of the #LinphoneAccountCreator |
| | | **/ |
| | | LINPHONE_PUBLIC const char * linphone_account_creator_get_algorithm(const LinphoneAccountCreator *creator); |
| | | LINPHONE_PUBLIC const char * linphone_account_creator_get_language(const LinphoneAccountCreator *creator); |
| | | |
| | | /** |
| | | * Set the display name. |
| | |
| | | * @param[in] cb The update account request to be used. |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_account_creator_cbs_set_update_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb); |
| | | |
| | | /** |
| | | * Get the login linphone account request. |
| | | * @param[in] cbs #LinphoneAccountCreatorCbs object. |
| | | * @return The current login linphone account request. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_login_linphone_account(const LinphoneAccountCreatorCbs *cbs); |
| | | |
| | | /** |
| | | * Assign a user pointer to a #LinphoneAccountCreatorCbs object. |
| | | * @param[in] cbs #LinphoneAccountCreatorCbs object. |
| | | * @param[in] cb The login linphone account request to be used. |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_account_creator_cbs_set_login_linphone_account(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb); |
| | | |
| | | /************************** End Account Creator Cbs **************************/ |
| | | |
old mode 100755
new mode 100644
| | |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_account_creator_service_set_update_account_cb(LinphoneAccountCreatorService *service, LinphoneAccountCreatorRequestFunc cb); |
| | | |
| | | /** |
| | | * Get the login linphone account request. |
| | | * @param[in] service #LinphoneAccountCreatorService object. |
| | | * @return The current login linphone account request. |
| | | * @donotwrap |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneAccountCreatorRequestFunc linphone_account_creator_service_get_login_linphone_account_cb(const LinphoneAccountCreatorService *service); |
| | | |
| | | /** |
| | | * Assign a user pointer to a #LinphoneAccountCreatorService object. |
| | | * @param[in] service #LinphoneAccountCreatorService object. |
| | | * @param[in] cb The login linphone account request to be used. |
| | | * @donotwrap |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_account_creator_service_set_login_linphone_account_cb(LinphoneAccountCreatorService *service, LinphoneAccountCreatorRequestFunc cb); |
| | | |
| | | /************************** End Account Creator Requests **************************/ |
| | | |
| | | #ifdef __cplusplus |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | #include "linphone/api/c-participant.h" |
| | | #include "linphone/api/c-participant-device.h" |
| | | #include "linphone/api/c-participant-device-identity.h" |
| | | #include "linphone/api/c-push-notification-message.h" |
| | | #include "linphone/api/c-search-result.h" |
| | | #include "linphone/api/c-types.h" |
| | | |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_call_cbs_set_snapshot_taken(LinphoneCallCbs *cbs, LinphoneCallCbsSnapshotTakenCb cb); |
| | | |
| | | /** |
| | | /** |
| | | * Get the next video frame decoded callback. |
| | | * @param[in] cbs LinphoneCallCbs object. |
| | | * @return The current next video frame decoded callback. |
| | |
| | | * @param[in] cb The next video frame decoded callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_call_cbs_set_next_video_frame_decoded(LinphoneCallCbs *cbs, LinphoneCallCbsNextVideoFrameDecodedCb cb); |
| | | |
| | | /** |
| | | * Get the camera not working callback. |
| | | * @param[in] cbs LinphoneCallCbs object. |
| | | * @return The camera not working callback. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCallCbsCameraNotWorkingCb linphone_call_cbs_get_camera_not_working(LinphoneCallCbs *cbs); |
| | | |
| | | /** |
| | | * Set the camera not working callback. |
| | | * @param[in] cbs LinphoneCallCbs object. |
| | | * @param[in] cb The camera not working callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_call_cbs_set_camera_not_working(LinphoneCallCbs *cbs, LinphoneCallCbsCameraNotWorkingCb cb); |
| | | |
| | | /** |
| | | * @} |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | * The application can later accept the call using this method. |
| | | * @param[in] call A #LinphoneCall object |
| | | * @param[in] params The specific parameters for this call, for example whether video is accepted or not. Use NULL to use default parameters |
| | | * @maybenil |
| | | * @return 0 on success, -1 on failure |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_with_params (LinphoneCall *call, const LinphoneCallParams *params); |
| | |
| | | * The call can then later be fully accepted using linphone_call_accept() or linphone_call_accept_with_params(). |
| | | * @param[in] call A #LinphoneCall object |
| | | * @param[in] params The call parameters to use (can be NULL) |
| | | * @maybenil |
| | | * @return 0 if successful, -1 otherwise |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_early_media_with_params (LinphoneCall *call, const LinphoneCallParams *params); |
| | |
| | | * |
| | | * @param[in] call A #LinphoneCall object |
| | | * @param[in] params The new call parameters to use (may be NULL) |
| | | * @maybenil |
| | | * @return 0 if successful, -1 otherwise. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_call_update (LinphoneCall *call, const LinphoneCallParams *params); |
| | |
| | | * (see linphone_call_params_enable_video()). |
| | | * @param[in] call A #LinphoneCall object |
| | | * @param[in] params A #LinphoneCallParams object describing the call parameters to accept |
| | | * @maybenil |
| | | * @return 0 if successful, -1 otherwise (actually when this function call is performed outside ot #LinphoneCallUpdatedByRemote state) |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_call_accept_update (LinphoneCall *call, const LinphoneCallParams *params); |
old mode 100755
new mode 100644
| | |
| | | */ |
| | | typedef void (*LinphoneCallCbsSnapshotTakenCb)(LinphoneCall *call, const char *filepath); |
| | | |
| | | /** |
| | | /** |
| | | * Callback to notify a next video frame has been decoded |
| | | * @param call LinphoneCall for which the next video frame has been decoded |
| | | */ |
| | | typedef void (*LinphoneCallCbsNextVideoFrameDecodedCb)(LinphoneCall *call); |
| | | |
| | | /** |
| | | * Callback to notify that the camera is not working and has been changed to "No Webcam". |
| | | * |
| | | * A camera is detected as mis-functionning as soon as it outputs no frames at all during |
| | | * a period of 5 seconds. |
| | | * This check is only performed on desktop platforms, in the purpose of notifying camera |
| | | * failures, for example if when a usb cable gets disconnected. |
| | | * |
| | | * @param call LinphoneCall for which the next video frame has been decoded |
| | | * @param camera_name the name of the non-working camera |
| | | */ |
| | | typedef void (*LinphoneCallCbsCameraNotWorkingCb)(LinphoneCall *call, const char *camera_name); |
| | | |
| | | /** |
| | | * @} |
| | |
| | | * @param content #LinphoneContent incoming content information |
| | | * @param buffer #LinphoneBuffer holding the received data. Empty buffer means end of file. |
| | | */ |
| | | typedef void (*LinphoneChatMessageCbsFileTransferRecvCb)(LinphoneChatMessage *msg, LinphoneContent* content, const LinphoneBuffer *buffer); |
| | | typedef void (*LinphoneChatMessageCbsFileTransferRecvCb)(LinphoneChatMessage *msg, const LinphoneContent* content, const LinphoneBuffer *buffer); |
| | | |
| | | /** |
| | | * File transfer send callback prototype. This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0. |
| | |
| | | * @param size the number of bytes expected by the framework |
| | | * @return A #LinphoneBuffer object holding the data written by the application. An empty buffer means end of file. |
| | | */ |
| | | typedef LinphoneBuffer * (*LinphoneChatMessageCbsFileTransferSendCb)(LinphoneChatMessage *msg, LinphoneContent* content, size_t offset, size_t size); |
| | | typedef LinphoneBuffer * (*LinphoneChatMessageCbsFileTransferSendCb)(LinphoneChatMessage *msg, const LinphoneContent* content, size_t offset, size_t size); |
| | | |
| | | /** |
| | | * File transfer progress indication callback prototype. |
| | |
| | | * @param offset The number of bytes sent/received since the beginning of the transfer. |
| | | * @param total The total number of bytes to be sent/received. |
| | | */ |
| | | typedef void (*LinphoneChatMessageCbsFileTransferProgressIndicationCb)(LinphoneChatMessage *msg, LinphoneContent* content, size_t offset, size_t total); |
| | | |
| | | /** |
| | | * Callback used to notify an ephemeral message that its lifespan before disappearing has started to decrease. |
| | | * This callback is called when the ephemeral message is read by the receiver. |
| | | * @param msg #LinphoneChatMessage object |
| | | */ |
| | | typedef void (*LinphoneChatMessageCbsEphemeralMessageTimerStartedCb)(LinphoneChatMessage* msg); |
| | | |
| | | /** |
| | | * Call back used to notify ephemeral message is deleted. |
| | | * @param msg #LinphoneChatMessage object |
| | | */ |
| | | typedef void (*LinphoneChatMessageCbsEphemeralMessageDeletedCb)(LinphoneChatMessage* msg); |
| | | typedef void (*LinphoneChatMessageCbsFileTransferProgressIndicationCb)(LinphoneChatMessage *msg, const LinphoneContent* content, size_t offset, size_t total); |
| | | |
| | | /** |
| | | * Is composing notification callback prototype. |
| | |
| | | * @param[in] event_log #LinphoneEventLog The event to be notified |
| | | */ |
| | | typedef void (*LinphoneChatRoomCbsConferenceLeftCb) (LinphoneChatRoom *cr, const LinphoneEventLog *eventLog); |
| | | |
| | | /** |
| | | * Callback used to notify a chat room that an ephemeral related event has been generated. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @param[in] event_log #LinphoneEventLog The event to be notified |
| | | */ |
| | | typedef void (*LinphoneChatRoomCbsEphemeralEventCb) (LinphoneChatRoom *cr, const LinphoneEventLog *eventLog); |
| | | |
| | | /** |
| | | * Callback used to notify a chat room that the lifespan of an ephemeral message before disappearing has started to decrease. |
| | | * This callback is called when the ephemeral message is read by the receiver. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @param[in] event_log #LinphoneEventLog The event to be notified |
| | | */ |
| | | typedef void (*LinphoneChatRoomCbsEphemeralMessageTimerStartedCb) (LinphoneChatRoom *cr, const LinphoneEventLog *eventLog); |
| | | |
| | | /** |
| | | * Callback used to notify a chat room that an ephemeral message has been deleted. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @param[in] event_log #LinphoneEventLog The event to be notified |
| | | */ |
| | | typedef void (*LinphoneChatRoomCbsEphemeralMessageDeletedCb) (LinphoneChatRoom *cr, const LinphoneEventLog *eventLog); |
| | | |
| | | /** |
| | | * Callback used when a group chat room is created server-side to generate the address of the chat room. |
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC void linphone_chat_message_cbs_set_participant_imdn_state_changed (LinphoneChatMessageCbs *cbs, LinphoneChatMessageCbsParticipantImdnStateChangedCb cb); |
| | | |
| | | /** |
| | | * Get the current "ephemeral message timer started" callback. This callback is called when the message deletion timer starts (the message has been viewed). |
| | | * @param[in] cbs #LinphoneChatMessageCbs object. |
| | | * @return The current ephemeral message timer started callback. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneChatMessageCbsEphemeralMessageTimerStartedCb linphone_chat_message_cbs_get_ephemeral_message_timer_started (const LinphoneChatMessageCbs *cbs); |
| | | |
| | | /** |
| | | * Set the ephemeral message timer started callback. This callback will be used when new message deletion timer starts (the message has been viewed). |
| | | * @param[in] cbs LinphoneChatMessageCbs object. |
| | | * @param[in] cb The ephemeral message timer started callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_message_cbs_set_ephemeral_message_timer_started (LinphoneChatMessageCbs *cbs, LinphoneChatMessageCbsEphemeralMessageTimerStartedCb cb); |
| | | |
| | | /** |
| | | * Get the ephemeral message deleted callback. This callback is used when a message deletion timer runs out (message is deleted). |
| | | * @param[in] cbs #LinphoneChatMessageCbs object. |
| | | * @return The current ephemeral message deleted callback. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneChatMessageCbsEphemeralMessageDeletedCb linphone_chat_message_cbs_get_ephemeral_message_deleted (const LinphoneChatMessageCbs *cbs); |
| | | |
| | | /** |
| | | * Set the ephemeral message deleted callback. This callback is used when new message deletion timer runs out (message is deleted). |
| | | * @param[in] cbs LinphoneChatMessageCbs object. |
| | | * @param[in] cb The ephemeral message deleted callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_message_cbs_set_ephemeral_message_deleted (LinphoneChatMessageCbs *cbs, LinphoneChatMessageCbsEphemeralMessageDeletedCb cb); |
| | | |
| | | /** |
| | | * @} |
| | | */ |
| | | |
old mode 100755
new mode 100644
| | |
| | | /** |
| | | * Gets the forward info if available as a string |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @return the original sender of the message if it has been forwarded, null otherwise |
| | | * @return the #LinphoneContent buffer if available, null otherwise |
| | | */ |
| | | LINPHONE_PUBLIC const char *linphone_chat_message_get_forward_info (const LinphoneChatMessage *msg); |
| | | |
| | | /** |
| | | * Returns true if the chat message is an ephemeral message. |
| | | * An ephemeral message will automatically disappear from the recipient's screen after the message has been viewed. |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @return true if it is an ephemeral message, false otherwise |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_chat_message_is_ephemeral(const LinphoneChatMessage *msg); |
| | | |
| | | /** |
| | | * Returns lifetime of an ephemeral message. |
| | | * The lifetime is the duration after which the ephemeral message will disappear once viewed. |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @return the lifetime of an ephemeral message, by default 86400s. |
| | | */ |
| | | LINPHONE_PUBLIC long linphone_chat_message_get_ephemeral_lifetime (const LinphoneChatMessage *msg); |
| | | |
| | | /** |
| | | * Returns the real time at which an ephemeral message expires and will be deleted. |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @return the time at which an ephemeral message expires. 0 means the message has not been read. |
| | | */ |
| | | LINPHONE_PUBLIC time_t linphone_chat_message_get_ephemeral_expire_time (const LinphoneChatMessage *msg); |
| | | |
| | | /** |
| | | * Fulfill a chat message char by char. Message linked to a Real Time Text Call send char in realtime following RFC 4103/T.140 |
| | | * To commit a message, use #linphone_chat_room_send_message |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @param[in] character T.140 char |
| | | * @return 0 if succeed. |
| | | * @returns 0 if succeed. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_chat_message_put_char (LinphoneChatMessage *msg, uint32_t character); |
| | | |
| | |
| | | const LinphoneChatMessage *msg, |
| | | LinphoneChatMessageState state |
| | | ); |
| | | |
| | | /** |
| | | * Gets the callId accociated with the message |
| | | * @param[in] msg #LinphoneChatMessage object. |
| | | * @return the call Id |
| | | */ |
| | | LINPHONE_PUBLIC const char *linphone_chat_message_get_call_id(const LinphoneChatMessage *msg); |
| | | |
| | | /** |
| | | * @} |
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC void linphone_chat_room_cbs_set_conference_left (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsConferenceLeftCb cb); |
| | | |
| | | /** |
| | | * Get the ephemeral event callback. |
| | | * @param[in] cbs #LinphoneChatRoomCbs object. |
| | | * @return The ephemeral event callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralEventCb linphone_chat_room_cbs_get_ephemeral_event (const LinphoneChatRoomCbs *cbs); |
| | | |
| | | /** |
| | | * Set the ephemeral event callback. |
| | | * @param[in] cbs #LinphoneChatRoomCbs object. |
| | | * @param[in] cb The ephemeral event callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_event (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralEventCb cb); |
| | | |
| | | /** |
| | | * Get the current "ephemeral message timer started" callback. This callback is called when a message deletion timer starts (the message has been viewed). |
| | | * @param[in] cbs LinphoneChatRoomCbs object. |
| | | * @return The current ephemeral message "timer started" callback. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralMessageTimerStartedCb linphone_chat_room_cbs_get_ephemeral_message_timer_started (const LinphoneChatRoomCbs *cbs); |
| | | |
| | | /** |
| | | * Set the ephemeral message timer started callback. This callback will be used when new message deletion timer starts (the message has been viewed). |
| | | * @param[in] cbs LinphoneChatRoomCbs object. |
| | | * @param[in] cb The ephemeral message timer started callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_message_timer_started (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralMessageTimerStartedCb cb); |
| | | |
| | | /** |
| | | * Get the ephemeral message deleted callback. This callback is used when a message deletion timer runs out (message is deleted). |
| | | * @param[in] cbs LinphoneChatRoomCbs object. |
| | | * @return The current ephemeral message deleted callback. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralMessageDeletedCb linphone_chat_room_cbs_get_ephemeral_message_deleted (const LinphoneChatRoomCbs *cbs); |
| | | |
| | | /** |
| | | * Set the ephemeral message deleted callback. This callback is used when new message deletion timer runs out (message is deleted). |
| | | * @param[in] cbs LinphoneChatRoomCbs object. |
| | | * @param[in] cb The ephemeral message deleted callback to be used. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_message_deleted (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralMessageDeletedCb cb); |
| | | |
| | | /** |
| | | * Get the conference address generation callback. |
| | | * @param[in] cbs #LinphoneChatRoomCbs object |
| | | * @return The current conference address generation callback |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Enable or disable the ephemeral message feature in the chat room. Works only for conference based chat room. |
| | | * An ephemeral message will automatically disappear from the recipient's screen after the message has been viewed. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @param[in] ephem TRUE if the ephemeral message feature is enabled, FALSE otherwise. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_enable_ephemeral (LinphoneChatRoom *cr, bool_t ephem); |
| | | |
| | | /** |
| | | * Returns whether or not the ephemeral message feature is enabled in the chat room. |
| | | * @param[in] cr The #LinphoneChatRoom object corresponding to the conversation |
| | | * @return true if ephemeral is enabled, false otherwise. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_chat_room_ephemeral_enabled (const LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Set lifetime (in seconds) for all new ephemral messages in the chat room. |
| | | * After the message is read, it will be deleted after "time" seconds. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @param[in] time The ephemral lifetime, default 24h, 86400s |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_set_ephemeral_lifetime (LinphoneChatRoom *cr, long time); |
| | | |
| | | /** |
| | | * Get lifetime (in seconds) for all new ephemeral messages in the chat room. |
| | | * After the message is read, it will be deleted after "time" seconds. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @return the ephemeral lifetime (in secoonds) |
| | | */ |
| | | LINPHONE_PUBLIC long linphone_chat_room_get_ephemeral_lifetime (const LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Uses linphone spec to check if all participants support ephemeral messages. |
| | | * It doesn't prevent to send ephemeral messages in the room but those who don't support it |
| | | * won't delete messages after lifetime has expired. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @return true if all participants in the chat room support ephemeral messages, false otherwise |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_chat_room_ephemeral_supported_by_all_participants (const LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Delete a message from the chat room history. |
| | | * @param[in] cr The #LinphoneChatRoom object corresponding to the conversation. |
| | | * @param[in] msg The #LinphoneChatMessage object to remove. |
| | |
| | | * When realtime text is enabled #linphone_call_params_realtime_text_enabled, #LinphoneCoreIsComposingReceivedCb is call everytime a char is received from peer. |
| | | * At the end of remote typing a regular #LinphoneChatMessage is received with committed data from #LinphoneCoreMessageReceivedCb. |
| | | * @param[in] cr #LinphoneChatRoom object |
| | | * @return RFC 4103/T.140 char |
| | | * @returns RFC 4103/T.140 char |
| | | */ |
| | | LINPHONE_PUBLIC uint32_t linphone_chat_room_get_char(const LinphoneChatRoom *cr); |
| | | |
| | |
| | | * get Curent Call associated to this chatroom if any |
| | | * To commit a message, use #linphone_chat_room_send_message |
| | | * @param[in] room #LinphoneChatRomm |
| | | * @return #LinphoneCall or NULL. |
| | | * @returns #LinphoneCall or NULL. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCall *linphone_chat_room_get_call(const LinphoneChatRoom *room); |
| | | |
| | |
| | | * Use linphone_chat_room_can_handle_participants() to know if this chat room handles participants. |
| | | * @param[in] cr A #LinphoneChatRoom object |
| | | * @param[in] addresses \bctbx_list{LinphoneAddress} |
| | | * @return True if everything is OK, False otherwise |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_chat_room_add_participants (LinphoneChatRoom *cr, const bctbx_list_t *addresses); |
| | | LINPHONE_PUBLIC void linphone_chat_room_add_participants (LinphoneChatRoom *cr, const bctbx_list_t *addresses); |
| | | |
| | | /** |
| | | * Tells whether a chat room is able to handle participants. |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | */ |
| | | LINPHONE_PUBLIC const char *linphone_event_log_get_subject (const LinphoneEventLog *event_log); |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // ConferenceEphemeralMessageEvent. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * Returns the ephemeral message lifetime of a conference ephemeral message event. |
| | | * Ephemeral lifetime means the time before an ephemeral message which has been viewed gets deleted. |
| | | * @param[in] event_log A #LinphoneEventLog object. |
| | | * @return The ephemeral message lifetime. |
| | | */ |
| | | LINPHONE_PUBLIC long linphone_event_log_get_ephemeral_message_lifetime (const LinphoneEventLog *event_log); |
| | | /** |
| | | * @} |
| | | */ |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | // compilation terminated. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // Call. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * #LinphoneCallState enum represents the different states a call can reach into. |
| | | * The application is notified of a state change through the LinphoneCoreVTable::call_state_changed callback. |
| | | * @ingroup call_control |
| | | */ |
| | | L_DECLARE_C_ENUM(CallState, L_ENUM_VALUES_CALL_SESSION_STATE); |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // ChatRoom. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * #LinphoneChatMessageDirection is used to indicate if a message is outgoing or incoming. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM(ChatMessageDirection, L_ENUM_VALUES_CHAT_MESSAGE_DIRECTION); |
| | | |
| | | /** |
| | | * #LinphoneChatMessageState is used to notify if messages have been successfully delivered or not. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM(ChatMessageState, L_ENUM_VALUES_CHAT_MESSAGE_STATE); |
| | | |
| | | /** |
| | | * #LinphoneChatRoomCapabilities is used to indicate the capabilities of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomCapabilities, L_ENUM_VALUES_CHAT_ROOM_CAPABILITIES); |
| | | |
| | | /** |
| | | * #LinphoneChatRoomBackend is used to indicate the backend implementation of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomBackend, L_ENUM_VALUES_CHAT_ROOM_BACKEND); |
| | | |
| | | /** |
| | | * #LinphoneChatRoomEncryptionBackend is used to indicate the encryption engine used by a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM_FIXED_VALUES(ChatRoomEncryptionBackend, L_ENUM_VALUES_CHAT_ROOM_ENCRYPTION_BACKEND); |
| | | |
| | | /** |
| | | * TODO move to encryption engine object when available |
| | | * #LinphoneChatRoomSecurityLevel is used to indicate the encryption security level of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM(ChatRoomSecurityLevel, L_ENUM_VALUES_ENCRYPTION_ENGINE_SECURITY_LEVEL); |
| | | |
| | | /** |
| | | * #LinphoneChatRoomState is used to indicate the current state of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | L_DECLARE_C_ENUM(ChatRoomState, L_ENUM_VALUES_CHAT_ROOM_STATE); |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // EventLog. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * #LinphoneEventLogType is used to indicate the type of an event. Useful for cast. |
| | | * @ingroup events |
| | | */ |
| | | L_DECLARE_C_ENUM(EventLogType, L_ENUM_VALUES_EVENT_LOG_TYPE); |
| | | |
| | | /** |
| | | * #LinphoneSecurityEventType is used to indicate the type of security event. |
| | | * @ingroup events |
| | | */ |
| | | L_DECLARE_C_ENUM(SecurityEventType, L_ENUM_VALUES_SECURITY_EVENT_TYPE); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif // ifdef __cplusplus |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | /** |
| | | * Use to get real time text following rfc4103. |
| | | * @param params #LinphoneCallParams |
| | | * @return returns true if call rtt is activated. |
| | | * @returns returns true if call rtt is activated. |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_call_params_realtime_text_enabled(const LinphoneCallParams *params); |
| | | |
| | | /** |
| | | * Use to set keep alive interval for real time text following rfc4103. |
| | | * @param params #LinphoneCallParams |
| | | * @param interval The keep alive interval for real time text, 25000 by default. |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_call_params_set_realtime_text_keepalive_interval(LinphoneCallParams *params, unsigned int interval); |
| | | |
| | | /** |
| | | * Use to get keep alive interval of real time text following rfc4103. |
| | | * @param params #LinphoneCallParams |
| | | * @return returns keep alive interval of real time text. |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC unsigned int linphone_call_params_get_realtime_text_keepalive_interval(const LinphoneCallParams *params); |
| | | |
| | | /** |
| | | * Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call. |
| | |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_call_params_clear_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type); |
| | | |
| | | /** |
| | | * Gets a list of #LinphoneContent set if exists |
| | | * @param[in] params The #LinphoneCallParams to get the custom Content from. |
| | | * @return \bctbx_list{LinphoneContent} A list of #LinphoneContent set if exists, NULL otherwise. |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC bctbx_list_t* linphone_call_params_get_custom_contents (const LinphoneCallParams *params); |
| | | |
| | | /** |
| | | * Adds a #LinphoneContent to be added to the INVITE SDP. |
| | | * @param[in] params The #LinphoneCallParams in which to set the custom #LinphoneContent. |
| | | * @param[in] content The #LinphoneContent to be added. |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_call_params_add_custom_content (LinphoneCallParams *params, LinphoneContent *content); |
| | | |
| | | /** |
| | | * Indicates whether RTP bundle mode (also known as Media Multiplexing) is enabled. |
| | | * See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 for more information. |
| | | * @param[in] params the #LinphoneCallParams |
| | | * @return a boolean indicating the enablement of rtp bundle mode. |
| | | * @ingroup media_parameters |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_call_params_rtp_bundle_enabled(const LinphoneCallParams *params); |
| | | |
| | | /** |
| | | * Enables or disables RTP bundle mode (Media Multiplexing). |
| | | * See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 for more information about the feature. |
| | | * When enabled, liblinphone will try to negociate the use of a single port for all streams. |
| | | * It automatically enables rtcp-mux. |
| | | * @param[in] params the #LinphoneCallParams |
| | | * @param[in] value a boolean to indicate whether the feature is to be enabled. |
| | | * @ingroup media_parameters |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_call_params_enable_rtp_bundle(LinphoneCallParams *params, bool_t value); |
| | | |
| | | |
| | | /******************************************************************************* |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | typedef void (*LinphoneCoreCbsMessageReceivedCb)(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message); |
| | | |
| | | /** |
| | | * Called after the #send method of the #LinphoneChatMessage was called. |
| | | * The message will be in state InProgress. |
| | | * In case of resend this callback won't be called. |
| | | * Chat message callback prototype |
| | | * @param lc #LinphoneCore object |
| | | * @param room #LinphoneChatRoom involved in this conversation. Can be be created by the framework in case \link #LinphoneAddress the from \endlink is not present in any chat room. |
| | | * @param #LinphoneChatMessage outgoing message |
| | |
| | | * @param buff pointer to the received data |
| | | * @param size number of bytes to be read from buff. 0 means end of file. |
| | | */ |
| | | typedef void (*LinphoneCoreFileTransferRecvCb)(LinphoneCore *lc, LinphoneChatMessage *message, LinphoneContent* content, const char* buff, size_t size); |
| | | typedef void (*LinphoneCoreFileTransferRecvCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, const char* buff, size_t size); |
| | | |
| | | /** |
| | | * File transfer send callback prototype. This function is called by the core upon an outgoing file transfer is started. This function is called until size is set to 0. |
| | |
| | | * @param size as input value, it represents the number of bytes expected by the framework. As output value, it means the number of bytes wrote by the application in the buffer. 0 means end of file. |
| | | * |
| | | */ |
| | | typedef void (*LinphoneCoreFileTransferSendCb)(LinphoneCore *lc, LinphoneChatMessage *message, LinphoneContent* content, char* buff, size_t* size); |
| | | typedef void (*LinphoneCoreFileTransferSendCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, char* buff, size_t* size); |
| | | |
| | | /** |
| | | * File transfer progress indication callback prototype. |
| | |
| | | * @param offset The number of bytes sent/received since the beginning of the transfer. |
| | | * @param total The total number of bytes to be sent/received. |
| | | */ |
| | | typedef void (*LinphoneCoreFileTransferProgressIndicationCb)(LinphoneCore *lc, LinphoneChatMessage *message, LinphoneContent* content, size_t offset, size_t total); |
| | | typedef void (*LinphoneCoreFileTransferProgressIndicationCb)(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, size_t offset, size_t total); |
| | | |
| | | /** |
| | | * Is composing notification callback prototype. |
| | |
| | | * @param[in] cr The #LinphoneChatRoom object for which the state has changed |
| | | */ |
| | | typedef void (*LinphoneCoreCbsChatRoomStateChangedCb) (LinphoneCore *lc, LinphoneChatRoom *cr, LinphoneChatRoomState state); |
| | | |
| | | /** |
| | | * Callback prototype telling that a #LinphoneChatRoom subject has changed. |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] cr The #LinphoneChatRoom object for which the subject has changed |
| | | */ |
| | | typedef void (*LinphoneCoreCbsChatRoomSubjectChangedCb) (LinphoneCore *lc, LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Callback prototype telling that a #LinphoneChatRoom ephemeral message has expired. |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] cr The #LinphoneChatRoom object for which a message has expired. |
| | | */ |
| | | typedef void (*LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb) (LinphoneCore *lc, LinphoneChatRoom *cr); |
| | | |
| | | /** |
| | | * Callback prototype telling the result of decoded qrcode |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | * Check whether video will be enable at conference starting |
| | | * @return if true, the video will be enable at conference starting |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_conference_params_video_enabled(const LinphoneConferenceParams *params); |
| | | |
| | | /** |
| | | * Enable local participant to enter the conference. |
| | | * The local participant is the one driving the local #LinphoneCore. It uses the local sound devices. |
| | | * The default value is TRUE. Setting to FALSE is mostly helpful when using liblinphone on a server application. |
| | | * @param params A #LinphoneConferenceParams |
| | | * @param enable If true, local participant is automatically added to the conference. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_conference_params_enable_local_participant(LinphoneConferenceParams *params, bool_t enable); |
| | | |
| | | /** |
| | | * Returns whether local participant has to enter the conference. |
| | | * @return if true, local participant is by default part of the conference. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_conference_params_local_participant_enabled(const LinphoneConferenceParams *params); |
| | | LINPHONE_PUBLIC bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param params #LinphoneCallParams to use for inviting the participants. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_conference_invite_participants(LinphoneConference *conf, const bctbx_list_t *addresses, const LinphoneCallParams *params); |
| | | |
| | | /** |
| | | * Join an existing call to the conference. |
| | | * @param obj The conference. |
| | | * @param call a #LinphoneCall that has to be added to the conference. |
| | | */ |
| | | LINPHONE_PUBLIC int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *call); |
| | | |
| | | /** |
| | | * Get the conference id as string |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LinphoneCoreCbsEcCalibrationAudioUninitCb ec_calibration_audio_uninit; |
| | | LinphoneCoreCbsMessageReceivedCb message_sent; |
| | | LinphoneCoreCbsChatRoomReadCb chat_room_read; |
| | | LinphoneCoreCbsChatRoomSubjectChangedCb chat_room_subject_changed; |
| | | LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb chat_room_ephemeral_message_deleted; |
| | | void *user_data; /**<User data associated with the above callbacks */ |
| | | } LinphoneCoreVTable; |
| | | |
| | |
| | | LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_state_changed (LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomStateChangedCb cb); |
| | | |
| | | /** |
| | | * Get the chat room subject changed callback. |
| | | * @param[in] cbs #LinphoneCoreCbs object |
| | | * @return The current callback |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCoreCbsChatRoomSubjectChangedCb linphone_core_cbs_get_chat_room_subject_changed (LinphoneCoreCbs *cbs); |
| | | |
| | | /** |
| | | * Set the chat room subject changed callback. |
| | | * @param[in] cbs #LinphoneCoreCbs object |
| | | * @param[in] cb The callback to use |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_subject_changed (LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomSubjectChangedCb cb); |
| | | |
| | | /** |
| | | * Get the chat room ephemeral message deleted callback. |
| | | * @param[in] cbs #LinphoneCoreCbs object |
| | | * @return The current callback |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb linphone_core_cbs_get_chat_room_ephemeral_message_deleted (LinphoneCoreCbs *cbs); |
| | | |
| | | /** |
| | | * Set the chat room ephemeral message deleted callback. |
| | | * @param[in] cbs #LinphoneCoreCbs object |
| | | * @param[in] cb The callback to use |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_ephemeral_message_deleted (LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb cb); |
| | | |
| | | /** |
| | | * Get the qrcode found callback. |
| | | * @param[in] cbs LinphoneCoreCbs object |
| | | * @return The current callback |
| | |
| | | * @param[in] core The #LinphoneCore object to be stopped |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_stop (LinphoneCore *core); |
| | | |
| | | /** |
| | | * Stop asynchronously a #LinphoneCore object after it has been instantiated and started. |
| | | * State changes to Shutdown then linphone_core_iterate() must be called to allow the Core to end asynchronous tasks (terminate call, etc.). |
| | | * When all tasks are finished, State will change to Off. |
| | | * Must be called only if #LinphoneGlobalState is On. |
| | | * When #LinphoneGlobalState is Off #LinphoneCore can be started again using linphone_core_start(). |
| | | * @ingroup initializing |
| | | * @param[in] core The #LinphoneCore object to be stopped |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_stop_async (LinphoneCore *core); |
| | | |
| | | /** |
| | | * Increment the reference counter of a #LinphoneCore object. |
| | |
| | | * The parameters are initialized according to the current #LinphoneCore configuration and the current state of the LinphoneCall. |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] call #LinphoneCall for which the parameters are to be build, or NULL in the case where the parameters are to be used for a new outgoing call. |
| | | * @maybenil |
| | | * @return A new #LinphoneCallParams object |
| | | * @ingroup call_control |
| | | */ |
| | |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] remote_address The remote address of the call that we want to get |
| | | * @return The call if it has been found, NULL otherwise |
| | | * @maybenil |
| | | * @ingroup call_control |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCall *linphone_core_get_call_by_remote_address(const LinphoneCore *lc, const char *remote_address); |
| | |
| | | LINPHONE_PUBLIC void linphone_core_set_mtu(LinphoneCore *lc, int mtu); |
| | | |
| | | /** |
| | | * Enable or disable the UPDATE method support |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] value Enable or disable it |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_enable_sip_update(const LinphoneCore *lc, int value); |
| | | |
| | | /** |
| | | * Enable the Session Timers support |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] enabled Enable or disable it |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_session_expires_enabled(const LinphoneCore *lc, bool_t enabled); |
| | | |
| | | /** |
| | | * Check if the Session Timers feature is enabled |
| | | * @param[in] lc #LinphoneCore object |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_core_get_session_expires_enabled(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Sets the session expires value, 0 by default |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] expire The session expires value |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_session_expires_value(const LinphoneCore *lc, int expires); |
| | | |
| | | /** |
| | | * Returns the session expires value |
| | | * @param[in] lc #LinphoneCore object |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC int linphone_core_get_session_expires_value(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Sets the session expires refresher value |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] refresher The refresher configuration value |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_session_expires_refresher_value(const LinphoneCore *lc, LinphoneSessionExpiresRefresher refresher); |
| | | |
| | | /** |
| | | * Returns the session expires refresher value |
| | | * @param[in] lc #LinphoneCore object |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneSessionExpiresRefresher linphone_core_get_session_expires_refresher_value(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Sets the session expires minSE value, forced to a minimum of 90 by default |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] expire The minSE value |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_session_expires_min_value(const LinphoneCore *lc, int min); |
| | | |
| | | /** |
| | | * Returns the session expires min value, 90 by default |
| | | * @param[in] lc #LinphoneCore object |
| | | * @ingroup media_parameters |
| | | **/ |
| | | LINPHONE_PUBLIC int linphone_core_get_session_expires_min_value(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * This method is called by the application to notify the linphone core library when network is reachable. |
| | | * Calling this method with true trigger linphone to initiate a registration process for all proxies. |
| | | * Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes. |
| | |
| | | /** |
| | | * Get the path to the directory storing the user's certificates. |
| | | * @param[in] lc #LinphoneCore object. |
| | | * @return The path to the directory storing the user's certificates. |
| | | * @returns The path to the directory storing the user's certificates. |
| | | * @ingroup initializing |
| | | */ |
| | | LINPHONE_PUBLIC const char *linphone_core_get_user_certificates_path(LinphoneCore *lc); |
| | |
| | | LINPHONE_PUBLIC bool_t linphone_core_is_media_encryption_mandatory(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Define whether the configured media encryption is mandatory, if it is and the negotation cannot result |
| | | * Define whether the configured media encryption is mandatory, if it is and the negotation cannot result |
| | | * in the desired media encryption then the call will fail. If not an INVITE will be resent with encryption |
| | | * disabled. |
| | | * @param[in] lc #LinphoneCore object. |
| | |
| | | * get tunnel instance if available |
| | | * @ingroup tunnel |
| | | * @param lc core object |
| | | * @return #LinphoneTunnel or NULL if not available |
| | | * @returns #LinphoneTunnel or NULL if not available |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneTunnel *linphone_core_get_tunnel(const LinphoneCore *lc); |
| | | |
| | |
| | | LINPHONE_PUBLIC bool_t linphone_core_file_format_supported(LinphoneCore *lc, const char *fmt); |
| | | |
| | | /** |
| | | * Set the supported tags |
| | | * @param[in] core #LinphoneCore object |
| | | * @param[in] tag The feature tags to set |
| | | * @ingroup initializing |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_set_supported_tag(LinphoneCore *core, const char *tags); |
| | | |
| | | /** |
| | | * This function controls signaling features supported by the core. |
| | | * They are typically included in a SIP Supported header. |
| | | * @param[in] core #LinphoneCore object |
| | |
| | | LINPHONE_PUBLIC bool_t linphone_core_video_multicast_enabled(const LinphoneCore *core); |
| | | |
| | | /** |
| | | * Returns whether RTP bundle mode (also known as Media Multiplexing) is enabled. |
| | | * See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 for more information. |
| | | * @param[in] lc the #LinphoneCore |
| | | * @return a boolean indicating the enablement of rtp bundle mode. |
| | | * @ingroup media_parameters |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_core_rtp_bundle_enabled(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Enables or disables RTP bundle mode (Media Multiplexing). |
| | | * See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 for more information about the feature. |
| | | * When enabled, liblinphone will try to negociate the use of a single port for all streams when doing an outgoing call. |
| | | * It automatically enables rtcp-mux. |
| | | * This feature can also be enabled per-call using #LinphoneCallParams. |
| | | * @param[in] lc the #LinphoneCore |
| | | * @param[in] value a boolean to indicate whether the feature is to be enabled. |
| | | * @ingroup media_parameters |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_enable_rtp_bundle(LinphoneCore *lc, bool_t value); |
| | | |
| | | /** |
| | | * @brief Set the network simulator parameters. |
| | | * |
| | | * Liblinphone has the capabability of simulating the effects of a network (latency, lost packets, jitter, max bandwidth). |
| | |
| | | LINPHONE_PUBLIC bool_t linphone_core_realtime_text_enabled(LinphoneCore *lc); |
| | | |
| | | LINPHONE_PUBLIC void linphone_core_enable_realtime_text(LinphoneCore *lc, bool_t value); |
| | | |
| | | /** |
| | | * Gets keep alive interval of real time text. |
| | | * @param[in] lc #LinphoneCore object |
| | | * @return keep alive interval of real time text. |
| | | * @ingroup media_parameters |
| | | */ |
| | | LINPHONE_PUBLIC unsigned int linphone_core_realtime_text_get_keepalive_interval(const LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Set keep alive interval for real time text. |
| | | * @param[in] lc #LinphoneCore object |
| | | * @param[in] interval The keep alive interval of real time text, 25000 by default. |
| | | * @ingroup network_parameters |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_realtime_text_set_keepalive_interval(LinphoneCore *lc, unsigned int interval); |
| | | |
| | | /** |
| | | * Set http proxy address to be used for signaling during next channel connection. Use #linphone_core_set_network_reachable FASLE/TRUE to force channel restart. |
| | |
| | | * @param event the event name |
| | | * @param expires the whished duration of the subscription |
| | | * @param body an optional body, may be NULL. |
| | | * @maybenil |
| | | * @return a #LinphoneEvent holding the context of the created subcription. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneEvent *linphone_core_subscribe(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires, const LinphoneContent *body); |
| | |
| | | LINPHONE_PUBLIC int linphone_core_get_max_size_for_auto_download_incoming_files(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Returns whether or not sender name is hidden in forward message. |
| | | * @param[in] lc The #LinphoneCore |
| | | * @return whether or not the feature |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_core_is_sender_name_hidden_in_forward_message(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Enable whether or not to hide sender name in forward message |
| | | * @param[in] lc The #LinphoneCore |
| | | * @param[in] enable whether or not to enable the feature |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_enable_sender_name_hidden_in_forward_message(LinphoneCore *lc, bool_t enable); |
| | | |
| | | /** |
| | | * @} |
| | | */ |
| | | |
| | |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_core_ensure_registered(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Get the chat message with the call_id included in the push notification body |
| | | * This will start the core given in parameter, iterate until the message is received and return it. |
| | | * By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds. |
| | | * @param[in] lc The #LinphoneCore |
| | | * @param[in] call_id The callId of the Message SIP transaction |
| | | * @return The #LinphoneChatMessage object. |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC LinphonePushNotificationMessage * linphone_core_get_new_message_from_callid(LinphoneCore *lc, const char *call_id); |
| | | |
| | | /** |
| | | * Get the chat room we have been added into using the chat_room_addr included in the push notification body |
| | | * This will start the core given in parameter, iterate until the new chat room is received and return it. |
| | | * By default, after 25 seconds the function returns because iOS kills the app extension after 30 seconds. |
| | | * @param[in] lc The #LinphoneCore |
| | | * @param[in] chat_room_addr The sip address of the chat room |
| | | * @return The #LinphoneChatRoom object. |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneChatRoom * linphone_core_get_new_chat_room_from_conf_addr(LinphoneCore *lc, const char *chat_room_addr); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
old mode 100755
new mode 100644
| | |
| | | |
| | | /** |
| | | * Check whether the device is flagged has crappy opengl |
| | | * @return TRUE if crappy opengl flag is set, FALSE otherwise |
| | | * @returns TRUE if crappy opengl flag is set, FALSE otherwise |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_core_has_crappy_opengl(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Check whether the device has a hardware echo canceller |
| | | * @return TRUE if it does, FALSE otherwise |
| | | * @returns TRUE if it does, FALSE otherwise |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_core_has_builtin_echo_canceller(LinphoneCore *lc); |
| | | |
| | | /** |
| | | * Check whether the device is echo canceller calibration is required |
| | | * @return TRUE if it is required, FALSE otherwise |
| | | * @returns TRUE if it is required, FALSE otherwise |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC bool_t linphone_core_is_echo_canceller_calibration_required(LinphoneCore *lc); |
| | |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_stop_dtmf_stream(LinphoneCore* lc); |
| | | |
| | | /** |
| | | * @ingroup IOS |
| | | * Special function to indicate if the audio session is activated. Must be called when ProviderDelegate of the callkit notifies that the audio session is activated or deactivated. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_activate_audio_session(LinphoneCore* lc, bool_t actived); |
| | | |
| | | /** |
| | | * @ingroup IOS |
| | | * Special function to enable the callkit. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_core_enable_callkit (LinphoneCore* lc, bool_t enabled); |
| | | |
| | | /** |
| | | * @ingroup IOS |
| | | * Special function to check if the callkit is enabled, False by default. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_core_callkit_enabled (const LinphoneCore *lc); |
| | | |
| | | typedef bool_t (*LinphoneCoreIterateHook)(void *data); |
| | | |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | #define _L_CALL_ENUMS_H_ |
| | | |
| | | // ============================================================================= |
| | | /** |
| | | * #LinphoneCallState enum represents the different states a call can reach into. |
| | | * The application is notified of a state change through the LinphoneCoreVTable::call_state_changed callback. |
| | | * @ingroup call_control |
| | | */ |
| | | typedef enum _LinphoneCallState{ |
| | | LinphoneCallStateIdle, /**< Initial state */ |
| | | LinphoneCallStateIncomingReceived, /**< Incoming call received */ |
| | | LinphoneCallStateOutgoingInit, /**< Outgoing call initialized */ |
| | | LinphoneCallStateOutgoingProgress, /**< Outgoing call in progress */ |
| | | LinphoneCallStateOutgoingRinging, /**< Outgoing call ringing */ |
| | | LinphoneCallStateOutgoingEarlyMedia, /**< Outgoing call early media */ |
| | | LinphoneCallStateConnected, /**< Connected */ |
| | | LinphoneCallStateStreamsRunning, /**< Streams running */ |
| | | LinphoneCallStatePausing, /**< Pausing */ |
| | | LinphoneCallStatePaused, /**< Paused */ |
| | | LinphoneCallStateResuming, /**< Resuming */ |
| | | LinphoneCallStateReferred, /**< Referred */ |
| | | LinphoneCallStateError, /**< Error */ |
| | | LinphoneCallStateEnd, /**< Call end */ |
| | | LinphoneCallStatePausedByRemote, /**< Paused by remote */ |
| | | LinphoneCallStateUpdatedByRemote, /**< The call's parameters are updated for example when video is asked by remote */ |
| | | LinphoneCallStateIncomingEarlyMedia, /**< We are proposing early media to an incoming call */ |
| | | LinphoneCallStateUpdating, /**< We have initiated a call update */ |
| | | LinphoneCallStateReleased, /**< The call object is now released */ |
| | | LinphoneCallStateEarlyUpdatedByRemote, /**< The call is updated by remote while not yet answered (SIP UPDATE in early dialog received) */ |
| | | LinphoneCallStateEarlyUpdating, /**< We are updating the call while not yet answered (SIP UPDATE in early dialog sent) */ |
| | | } LinphoneCallState; |
| | | |
| | | #define L_ENUM_VALUES_CALL_SESSION_STATE(F) \ |
| | | F(Idle /**< Initial state */) \ |
| | | F(IncomingReceived /**< Incoming call received */) \ |
| | | F(OutgoingInit /**< Outgoing call initialized */) \ |
| | | F(OutgoingProgress /**< Outgoing call in progress */) \ |
| | | F(OutgoingRinging /**< Outgoing call ringing */) \ |
| | | F(OutgoingEarlyMedia /**< Outgoing call early media */) \ |
| | | F(Connected /**< Connected */) \ |
| | | F(StreamsRunning /**< Streams running */) \ |
| | | F(Pausing /**< Pausing */) \ |
| | | F(Paused /**< Paused */) \ |
| | | F(Resuming /**< Resuming */) \ |
| | | F(Referred /**< Referred */) \ |
| | | F(Error /**< Error */) \ |
| | | F(End /**< Call end */) \ |
| | | F(PausedByRemote /**< Paused by remote */) \ |
| | | F(UpdatedByRemote /**< The call's parameters are updated for example when video is asked by remote */) \ |
| | | F(IncomingEarlyMedia /**< We are proposing early media to an incoming call */) \ |
| | | F(Updating /**< We have initiated a call update */) \ |
| | | F(Released /**< The call object is now released */) \ |
| | | F(EarlyUpdatedByRemote /**< The call is updated by remote while not yet answered (SIP UPDATE in early dialog received) */) \ |
| | | F(EarlyUpdating /**< We are updating the call while not yet answered (SIP UPDATE in early dialog sent) */) |
| | | |
| | | // ============================================================================= |
| | | // DEPRECATED |
| | |
| | | #define LinphoneCallUpdatedByRemote LinphoneCallStateUpdatedByRemote |
| | | #define LinphoneCallIncomingEarlyMedia LinphoneCallStateIncomingEarlyMedia |
| | | #define LinphoneCallUpdating LinphoneCallStateUpdating |
| | | #define LinphoneCallEarlyUpdating LinphoneCallStateEarlyUpdating |
| | | #define LinphoneCallReleased LinphoneCallStateReleased |
| | | #define LinphoneCallEarlyUpdatedByRemote LinphoneCallStateEarlyUpdatedByRemote |
| | | #define LinphoneCallEarlyUpdating LinphoneCallStateEarlyUpdating |
| | | |
| | | #endif // ifndef _L_CALL_ENUMS_H_ |
old mode 100755
new mode 100644
| | |
| | | |
| | | // ============================================================================= |
| | | |
| | | /** |
| | | * #LinphoneChatMessageState is used to notify if messages have been successfully delivered or not. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatMessageState{ |
| | | LinphoneChatMessageStateIdle, /**< Initial state */ |
| | | LinphoneChatMessageStateInProgress, /**< Delivery in progress */ |
| | | LinphoneChatMessageStateDelivered, /**< Message successfully delivered and acknowledged by the server */ |
| | | LinphoneChatMessageStateNotDelivered, /**< Message was not delivered */ |
| | | LinphoneChatMessageStateFileTransferError, /**< Message was received and acknowledged but cannot get file from server */ |
| | | LinphoneChatMessageStateFileTransferDone, /**< File transfer has been completed successfully */ |
| | | LinphoneChatMessageStateDeliveredToUser, /**< Message successfully delivered an acknowledged by the remote user */ |
| | | LinphoneChatMessageStateDisplayed, /**< Message successfully displayed to the remote user */ |
| | | LinphoneChatMessageStateFileTransferInProgress, /** <File transfer is in progress. If message is incoming it's a download, otherwise it's an upload. */ |
| | | } LinphoneChatMessageState; |
| | | #define L_ENUM_VALUES_CHAT_MESSAGE_STATE(F) \ |
| | | F(Idle /**< Initial state */) \ |
| | | F(InProgress /**< Delivery in progress */) \ |
| | | F(Delivered /**< Message successfully delivered and acknowledged by the server */) \ |
| | | F(NotDelivered /**< Message was not delivered */) \ |
| | | F(FileTransferError /**< Message was received and acknowledged but cannot get file from server */) \ |
| | | F(FileTransferDone /**< File transfer has been completed successfully */) \ |
| | | F(DeliveredToUser /**< Message successfully delivered an acknowledged by the remote user */) \ |
| | | F(Displayed /**< Message successfully displayed to the remote user */) \ |
| | | F(FileTransferInProgress /** <File transfer is in progress. If message is incoming it's a download, otherwise it's an upload. */) |
| | | |
| | | |
| | | /** |
| | | * #LinphoneChatMessageDirection is used to indicate if a message is outgoing or incoming. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatMessageDirection{ |
| | | LinphoneChatMessageDirectionIncoming, /**< Incoming message */ |
| | | LinphoneChatMessageDirectionOutgoing, /**< Outgoing message */ |
| | | } LinphoneChatMessageDirection; |
| | | |
| | | #define L_ENUM_VALUES_CHAT_MESSAGE_DIRECTION(F) \ |
| | | F(Incoming /**< Incoming message */) \ |
| | | F(Outgoing /**< Outgoing message */) |
| | | |
| | | #endif // ifndef _L_CHAT_MESSAGE_ENUMS_H_ |
old mode 100755
new mode 100644
| | |
| | | #define _L_CHAT_ROOM_ENUMS_H_ |
| | | |
| | | // ============================================================================= |
| | | /** |
| | | * #LinphoneChatRoomState is used to indicate the current state of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatRoomState{ |
| | | LinphoneChatRoomStateNone, /**< Initial state */ |
| | | LinphoneChatRoomStateInstantiated, /**< Chat room is now instantiated on local */ |
| | | LinphoneChatRoomStateCreationPending, /**< One creation request was sent to the server */ |
| | | LinphoneChatRoomStateCreated, /**< Chat room was created on the server */ |
| | | LinphoneChatRoomStateCreationFailed, /**< Chat room creation failed */ |
| | | LinphoneChatRoomStateTerminationPending, /**< Wait for chat room termination */ |
| | | LinphoneChatRoomStateTerminated, /**< Chat room exists on server but not in local */ |
| | | LinphoneChatRoomStateTerminationFailed, /**< The chat room termination failed */ |
| | | LinphoneChatRoomStateDeleted /**< Chat room was deleted on the server */ |
| | | } LinphoneChatRoomState; |
| | | |
| | | /** |
| | | * #LinphoneChatRoomCapabilities is used to indicate the capabilities of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatRoomCapabilities{ |
| | | LinphoneChatRoomCapabilitiesNone = 0, /**< No capabilities. */ |
| | | LinphoneChatRoomCapabilitiesBasic = 1 << 0 , /**< No server. It's a direct communication */ |
| | | LinphoneChatRoomCapabilitiesRealTimeText = 1 << 1, /**< Supports RTT */ |
| | | LinphoneChatRoomCapabilitiesConference = 1 << 2, /**< Use server (supports group chat) */ |
| | | LinphoneChatRoomCapabilitiesProxy = 1 << 3, /**< Special proxy chat room flag */ |
| | | LinphoneChatRoomCapabilitiesMigratable = 1 << 4, /**< Chat room migratable from Basic to Conference */ |
| | | LinphoneChatRoomCapabilitiesOneToOne = 1 << 5, /**< A communication between two participants (can be Basic or Conference) */ |
| | | LinphoneChatRoomCapabilitiesEncrypted = 1 << 6 /**< Chat room is encrypted */ |
| | | } LinphoneChatRoomCapabilities; |
| | | #define L_ENUM_VALUES_CHAT_ROOM_STATE(F) \ |
| | | F(None /**< Initial state */) \ |
| | | F(Instantiated /**< Chat room is now instantiated on local */) \ |
| | | F(CreationPending /**< One creation request was sent to the server */) \ |
| | | F(Created /**< Chat room was created on the server */) \ |
| | | F(CreationFailed /**< Chat room creation failed */) \ |
| | | F(TerminationPending /**< Wait for chat room termination */) \ |
| | | F(Terminated /**< Chat room exists on server but not in local */) \ |
| | | F(TerminationFailed /**< The chat room termination failed */) \ |
| | | F(Deleted /**< Chat room was deleted on the server */) |
| | | |
| | | //To be deprecated |
| | | #define L_ENUM_VALUES_CHAT_ROOM_CAPABILITIES(F) \ |
| | | F(None /**< No capabilities. */, 0) \ |
| | | F(Basic /**< No server. It's a direct communication */, 1 << 0) \ |
| | | F(RealTimeText /**< Supports RTT */, 1 << 1) \ |
| | | F(Conference /**< Use server (supports group chat) */, 1 << 2) \ |
| | | F(Proxy /**< Special proxy chat room flag */, 1 << 3) \ |
| | | F(Migratable /**< Chat room migratable from Basic to Conference */, 1 << 4) \ |
| | | F(OneToOne /**< A communication between two participants (can be Basic or Conference) */, 1 << 5) \ |
| | | F(Encrypted /**< Chat room is encrypted */, 1 << 6) |
| | | |
| | | /** |
| | | * #LinphoneChatRoomBackend is used to indicate the backend implementation of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatRoomBackend{ |
| | | LinphoneChatRoomBackendBasic = 1 << 0, /**< Basic (client-to-client) chat room. */ |
| | | LinphoneChatRoomBackendFlexisipChat = 1 << 1 /**< Server-based chat room. */ |
| | | } LinphoneChatRoomBackend; |
| | | #define L_ENUM_VALUES_CHAT_ROOM_BACKEND(F) \ |
| | | F(Basic /**< Basic (client-to-client) chat room. */, 1 << 0) \ |
| | | F(FlexisipChat /**< Server-based chat room. */, 1 << 1) |
| | | |
| | | /** |
| | | * #LinphoneChatRoomEncryptionBackend is used to indicate the encryption engine used by a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatRoomEncryptionBackend{ |
| | | LinphoneChatRoomEncryptionBackendNone = 0, /**< No encryption. */ |
| | | LinphoneChatRoomEncryptionBackendLime = 1 << 0 /**< Lime x3dh encryption. */ |
| | | } LinphoneChatRoomEncryptionBackend; |
| | | |
| | | #define L_ENUM_VALUES_CHAT_ROOM_ENCRYPTION_BACKEND(F) \ |
| | | F(None /**< No encryption. */, 0) \ |
| | | F(Lime /**< Lime x3dh encryption. */, 1 << 0) |
| | | |
| | | #endif // ifndef _L_CHAT_ROOM_ENUMS_H_ |
old mode 100755
new mode 100644
| | |
| | | #define _L_ENCRYPTION_ENGINE_ENUMS_H_ |
| | | |
| | | // ============================================================================= |
| | | /** |
| | | * TODO move to encryption engine object when available |
| | | * #LinphoneChatRoomSecurityLevel is used to indicate the encryption security level of a chat room. |
| | | * @ingroup chatroom |
| | | */ |
| | | typedef enum _LinphoneChatRoomSecurityLevel{ |
| | | LinphoneChatRoomSecurityLevelUnsafe, /**< Security failure */ |
| | | LinphoneChatRoomSecurityLevelClearText, /**< No encryption */ |
| | | LinphoneChatRoomSecurityLevelEncrypted, /**< Encrypted */ |
| | | LinphoneChatRoomSecurityLevelSafe /**< Encrypted and verified */ |
| | | } LinphoneChatRoomSecurityLevel; |
| | | |
| | | #define L_ENUM_VALUES_ENCRYPTION_ENGINE_SECURITY_LEVEL(F) \ |
| | | F(Unsafe /**< Security failure */) \ |
| | | F(ClearText /**< No encryption */) \ |
| | | F(Encrypted /**< Encrypted */) \ |
| | | F(Safe /**< Encrypted and verified */) |
| | | |
| | | #endif // ifndef _L_ENCRYPTION_ENGINE_ENUMS_H_ |
old mode 100755
new mode 100644
| | |
| | | |
| | | // ============================================================================= |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // EventLog. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | /** |
| | | * #LinphoneEventLogType is used to indicate the type of an event. Useful for cast. |
| | | * @ingroup events |
| | | */ |
| | | typedef enum _EventLogType{ |
| | | LinphoneEventLogTypeNone, /**< No defined event */ |
| | | LinphoneEventLogTypeConferenceCreated, /**< Conference (created) event */ |
| | | LinphoneEventLogTypeConferenceTerminated, /**< Conference (terminated) event */ |
| | | LinphoneEventLogTypeConferenceCallStart, /**< Conference call (start) event */ |
| | | LinphoneEventLogTypeConferenceCallEnd, /**< Conference call (end) event */ |
| | | LinphoneEventLogTypeConferenceChatMessage, /**< Conference chat message event */ |
| | | LinphoneEventLogTypeConferenceParticipantAdded, /**< Conference participant (added) event */ |
| | | LinphoneEventLogTypeConferenceParticipantRemoved, /**< Conference participant (removed) event */ |
| | | LinphoneEventLogTypeConferenceParticipantSetAdmin, /**< Conference participant (set admin) event */ |
| | | LinphoneEventLogTypeConferenceParticipantUnsetAdmin, /**< Conference participant (unset admin) event */ |
| | | LinphoneEventLogTypeConferenceParticipantDeviceAdded, /**< Conference participant device (added) event */ |
| | | LinphoneEventLogTypeConferenceParticipantDeviceRemoved, /**< Conference participant device (removed) event */ |
| | | LinphoneEventLogTypeConferenceSubjectChanged, /**< Conference subject event */ |
| | | |
| | | LinphoneEventLogTypeConferenceSecurityEvent, /**< Conference encryption security event*/ |
| | | LinphoneEventLogTypeConferenceEphemeralMessageLifetimeChanged, /**< Conference ephemeral message (ephemeral message lifetime changed) event */ |
| | | LinphoneEventLogTypeConferenceEphemeralMessageEnabled, /**< Conference ephemeral message (ephemeral message enabled) event */ |
| | | LinphoneEventLogTypeConferenceEphemeralMessageDisabled, /**< Conference ephemeral message (ephemeral message disabled) event */ |
| | | } LinphoneEventLogType; |
| | | #define L_ENUM_VALUES_EVENT_LOG_TYPE(F) \ |
| | | F(None /**< No defined event */) \ |
| | | F(ConferenceCreated /**< Conference (created) event */) \ |
| | | F(ConferenceTerminated /**< Conference (terminated) event */) \ |
| | | F(ConferenceCallStart /**< Conference call (start) event */) \ |
| | | F(ConferenceCallEnd /**< Conference call (end) event */) \ |
| | | F(ConferenceChatMessage /**< Conference chat message event */) \ |
| | | F(ConferenceParticipantAdded /**< Conference participant (added) event */) \ |
| | | F(ConferenceParticipantRemoved /**< Conference participant (removed) event */) \ |
| | | F(ConferenceParticipantSetAdmin /**< Conference participant (set admin) event */) \ |
| | | F(ConferenceParticipantUnsetAdmin /**< Conference participant (unset admin) event */) \ |
| | | F(ConferenceParticipantDeviceAdded /**< Conference participant device (added) event */) \ |
| | | F(ConferenceParticipantDeviceRemoved /**< Conference participant device (removed) event */) \ |
| | | F(ConferenceSubjectChanged /**< Conference subject event */) \ |
| | | F(ConferenceSecurityEvent /**< Conference encryption security event*/) \ |
| | | |
| | | #endif // ifndef _L_EVENT_LOG_ENUMS_H_ |
old mode 100755
new mode 100644
| | |
| | | |
| | | // ============================================================================= |
| | | |
| | | /** |
| | | * #LinphoneSecurityEventType is used to indicate the type of security event. |
| | | * @ingroup events |
| | | */ |
| | | |
| | | typedef enum _SecurityEventType{ |
| | | LinphoneSecurityEventTypeNone, /**< Event is not a security event */ |
| | | LinphoneSecurityEventTypeSecurityLevelDowngraded, /**< Chatroom security level downgraded event */ |
| | | LinphoneSecurityEventTypeParticipantMaxDeviceCountExceeded, /**< Participant has exceeded the maximum number of device event */ |
| | | LinphoneSecurityEventTypeEncryptionIdentityKeyChanged, /**< Peer device instant messaging encryption identity key has changed event */ |
| | | LinphoneSecurityEventTypeManInTheMiddleDetected, /**< Man in the middle detected event */ |
| | | } LinphoneSecurityEventType; |
| | | |
| | | #define L_ENUM_VALUES_SECURITY_EVENT_TYPE(F) \ |
| | | F(None /**< Event is not a security event */) \ |
| | | F(SecurityLevelDowngraded /**< Chatroom security level downgraded event */) \ |
| | | F(ParticipantMaxDeviceCountExceeded /**< Participant has exceeded the maximum number of device event */) \ |
| | | F(EncryptionIdentityKeyChanged /**< Peer device instant messaging encryption identity key has changed event */) \ |
| | | F(ManInTheMiddleDetected /**< Man in the middle detected event */) \ |
| | | |
| | | #endif // ifndef _L_SECURITY_EVENT_ENUMS_H_ |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | * Update (refresh) an outgoing subscription, changing the body. |
| | | * @param lev a #LinphoneEvent |
| | | * @param body an optional body to include in the subscription update, may be NULL. |
| | | * @maybenil |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_event_update_subscribe(LinphoneEvent *lev, const LinphoneContent *body); |
| | | |
old mode 100755
new mode 100644
| | |
| | | ); |
| | | |
| | | /** |
| | | * Instantiate a shared #LinphoneCore object. |
| | | * |
| | | * The shared #LinphoneCore allow you to create several #LinphoneCore with the same config. |
| | | * Two #LinphoneCore can't run at the same time. |
| | | * |
| | | * A shared #LinphoneCore can be a "Main Core" or an "Executor Core". |
| | | * A "Main Core" automatically stops a running "Executor Core" when calling linphone_core_start() |
| | | * An "Executor Core" can't start unless no other #LinphoneCore is started. It can be stopped by a "Main Core" and |
| | | * switch to #LinphoneGlobalState Off at any time. |
| | | * |
| | | * Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications. |
| | | * When the application is in background, its Shared Main Core is stopped. |
| | | * |
| | | * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect. |
| | | * The returned #LinphoneCore will be in #LinphoneGlobalState Ready. |
| | | * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages. |
| | | * @param[in] factory The #LinphoneFactory singleton. |
| | | * @param[in] config_filename The name of the config file. If it does not exists it will be created. |
| | | * Its path is computed using the app_group_id. The config file is used to |
| | | * store all settings, proxies... so that all these settings become persistent over the life of the #LinphoneCore object. |
| | | * It is allowed to set a NULL config file. In that case #LinphoneCore will not store any settings. |
| | | * @param[in] factory_config_path A path to a read-only config file that can be used to store hard-coded preferences |
| | | * such as proxy settings or internal preferences. The settings in this factory file always override the ones in the |
| | | * normal config file. It is optional, use NULL if unneeded. |
| | | * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to |
| | | * pass an android Context on android, pass NULL on other platforms. |
| | | * @param[in] app_group_id Name of iOS App Group that lead to the file system that is shared between an app and its app extensions. |
| | | * @param[in] main_core Indicate if we want to create a "Main Core" or an "Executor Core". |
| | | * @see linphone_factory_create_shared_core_with_config |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_shared_core ( |
| | | const LinphoneFactory *factory, |
| | | const char *config_filename, |
| | | const char *factory_config_path, |
| | | void *system_context, |
| | | const char *app_group_id, |
| | | bool_t main_core |
| | | ); |
| | | |
| | | /** |
| | | * Instantiates a #LinphoneCore object with a given LpConfig. |
| | | * |
| | | * @param factory The #LinphoneFactory singleton. |
| | |
| | | const LinphoneFactory *factory, |
| | | LinphoneConfig *config, |
| | | void *system_context |
| | | ); |
| | | |
| | | /** |
| | | * Instantiate a shared #LinphoneCore object. |
| | | * |
| | | * The shared #LinphoneCore allow you to create several #LinphoneCore with the same config. |
| | | * Two #LinphoneCore can't run at the same time. |
| | | * |
| | | * A shared #LinphoneCore can be a "Main Core" or an "Executor Core". |
| | | * A "Main Core" automatically stops a running "Executor Core" when calling linphone_core_start() |
| | | * An "Executor Core" can't start unless no other #LinphoneCore is started. It can be stopped by a "Main Core" and |
| | | * switch to #LinphoneGlobalState Off at any time. |
| | | * |
| | | * Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications. |
| | | * When the application is in background, its Shared Main Core is stopped. |
| | | * |
| | | * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect. |
| | | * The returned #LinphoneCore will be in #LinphoneGlobalState Ready. |
| | | * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages. |
| | | * @param[in] factory The #LinphoneFactory singleton. |
| | | * @param[in] config A #LinphoneConfig object holding the configuration for the #LinphoneCore to be instantiated. |
| | | * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to |
| | | * pass an android Context on android, pass NULL on other platforms. |
| | | * @param[in] app_group_id Name of iOS App Group that lead to the file system that is shared between an app and its app extensions. |
| | | * @param[in] main_core Indicate if we want to create a "Main Core" or an "Executor Core". |
| | | * @see linphone_factory_create_shared_core |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_shared_core_with_config ( |
| | | const LinphoneFactory *factory, |
| | | LinphoneConfig *config, |
| | | void *system_context, |
| | | const char *app_group_id, |
| | | bool_t main_core |
| | | ); |
| | | |
| | | /** |
| | |
| | | * @return TRUE if IDMN are available |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_factory_is_imdn_available(LinphoneFactory *factory); |
| | | |
| | | /** |
| | | * Get the config path |
| | | * @param[in] factory the #LinphoneFactory |
| | | * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core. |
| | | * @return The config path |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC const char *linphone_factory_get_config_dir(LinphoneFactory *factory, void *context); |
| | | |
| | | /** |
| | | * Get the data path |
| | | * @param[in] factory the #LinphoneFactory |
| | | * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core. |
| | | * @return The data path |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC const char *linphone_factory_get_data_dir(LinphoneFactory *factory, void *context); |
| | | |
| | | /** |
| | | * Get the download path |
| | | * @param[in] factory the #LinphoneFactory |
| | | * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core. |
| | | * @return The download path |
| | | * @ingroup misc |
| | | **/ |
| | | LINPHONE_PUBLIC const char *linphone_factory_get_download_dir(LinphoneFactory *factory, void *context); |
| | | |
| | | /** |
| | | * @} |
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC float linphone_friend_get_capability_version(const LinphoneFriend *lf, const LinphoneFriendCapability capability); |
| | | |
| | | /** |
| | | * Removes a friend from it's friend list and from the rc if exists |
| | | * @param[in] lf #LinphoneFriend object to delete |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_friend_remove(LinphoneFriend *lf); |
| | | |
| | | /** |
| | | * @} |
| | | */ |
| | | |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | /** Set a chat message text to be sent by #linphone_chat_room_send_message |
| | | * @param[in] msg #LinphoneChatMessage |
| | | * @param[in] text Const char * |
| | | * @return 0 if succeed. |
| | | * @returns 0 if succeed. |
| | | * @donotwrap |
| | | */ |
| | | LINPHONE_PUBLIC int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text); |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC void linphone_logging_service_set_log_file(const LinphoneLoggingService *service, const char *dir, const char *filename, size_t max_size); |
| | | |
| | | /** |
| | | * @brief Set the domain where application logs are written (for example with #linphone_logging_service_message()). |
| | | * @param log_service The logging service singleton. |
| | | * @param domain The domain. |
| | | * @note The domain is mandatory to write logs. This needs to be set before setting the log level. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_set_domain(LinphoneLoggingService *log_service, const char *domain); |
| | | |
| | | /** |
| | | * @brief Get the domain where application logs are written (for example with #linphone_logging_service_message()). |
| | | * @param log_service The logging service singleton. |
| | | */ |
| | | LINPHONE_PUBLIC const char *linphone_logging_service_get_domain(LinphoneLoggingService *log_service); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelDebug message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_debug(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelTrace message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_trace(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelMessage message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_message(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelWarning message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_warning(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelError message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_error(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Write a LinphoneLogLevelFatal message to the logs. |
| | | * @param log_service The logging service singleton. |
| | | * @param msg The log message. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_logging_service_fatal(LinphoneLoggingService *log_service, const char *msg); |
| | | |
| | | /** |
| | | * @brief Increases the reference counter. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneLoggingServiceCbs *linphone_logging_service_cbs_ref(LinphoneLoggingServiceCbs *cbs); |
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC LinphoneConfig * linphone_config_new_with_factory(const char *config_filename, const char *factory_config_filename); |
| | | |
| | | /** |
| | | * Instantiates a #LinphoneConfig object from a user config file name, group id and a factory config file. |
| | | * The "group id" is the string that identify the "App group" capability of the iOS application. |
| | | * App group gives access to a shared file system where all the configuration files for shared core are stored. |
| | | * Both iOS application and iOS app extension that need shared core must activate the "App group" capability with the SAME |
| | | * "group id" in the project settings. |
| | | * The caller of this constructor owns a reference. linphone_config_unref() must be called when this object is no longer needed. |
| | | * @ingroup misc |
| | | * @param app_group_id used to compute the path of the config file in the file system shared by the shared Cores |
| | | * @param config_filename the filename of the user config file to read to fill the instantiated #LinphoneConfig |
| | | * @param factory_config_filename the filename of the factory config file to read to fill the instantiated #LinphoneConfig |
| | | * @see linphone_config_new |
| | | * |
| | | * The user config file is read first to fill the #LinphoneConfig and then the factory config file is read. |
| | | * Therefore the configuration parameters defined in the user config file will be overwritten by the parameters |
| | | * defined in the factory config file. |
| | | */ |
| | | LINPHONE_PUBLIC LinphoneConfig * linphone_config_new_for_shared_core(const char *app_group_id, const char* config_filename, const char *factory_path); |
| | | |
| | | /** |
| | | * Reads a user config file and fill the #LinphoneConfig with the read config values. |
| | | * @ingroup misc |
| | | * @param lpconfig The #LinphoneConfig object to fill with the content of the file |
| | |
| | | * Writes the config file to disk. |
| | | **/ |
| | | LINPHONE_PUBLIC LinphoneStatus linphone_config_sync(LinphoneConfig *lpconfig); |
| | | |
| | | /** |
| | | * Reload the config from the file. |
| | | **/ |
| | | LINPHONE_PUBLIC void linphone_config_reload(LinphoneConfig *lpconfig); |
| | | |
| | | /** |
| | | * Returns 1 if a given section is present in the configuration. |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC const struct addrinfo * linphone_nat_policy_get_stun_server_addrinfo(LinphoneNatPolicy *policy); |
| | | |
| | | /** |
| | | * Enable UDP TURN transport. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @param[in] enable Boolean value telling whether to enable UDP TURN transport. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_nat_policy_enable_udp_turn_transport(LinphoneNatPolicy *policy, bool_t enable); |
| | | |
| | | /** |
| | | * Tells whether UDP TURN transport is enabled. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @return Boolean value telling whether UDP TURN transport is enabled. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_nat_policy_udp_turn_transport_enabled(LinphoneNatPolicy *policy); |
| | | |
| | | /** |
| | | * Enable TCP TURN transport. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @param[in] enable Boolean value telling whether to enable TCP TURN transport. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_nat_policy_enable_tcp_turn_transport(LinphoneNatPolicy *policy, bool_t enable); |
| | | |
| | | /** |
| | | * Tells whether TCP TURN transport is enabled. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @return Boolean value telling whether TCP TURN transport is enabled. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_nat_policy_tcp_turn_transport_enabled(LinphoneNatPolicy *policy); |
| | | |
| | | /** |
| | | * Enable TLS TURN transport. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @param[in] enable Boolean value telling whether to enable TLS TURN transport. |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_nat_policy_enable_tls_turn_transport(LinphoneNatPolicy *policy, bool_t enable); |
| | | |
| | | /** |
| | | * Tells whether TLS TURN transport is enabled. |
| | | * Used when TURN is enabled. |
| | | * @param[in] policy #LinphoneNatPolicy object |
| | | * @return Boolean value telling whether TLS TURN transport is enabled. |
| | | */ |
| | | LINPHONE_PUBLIC bool_t linphone_nat_policy_tls_turn_transport_enabled(LinphoneNatPolicy *policy); |
| | | |
| | | /** |
| | | * Returns the #LinphoneCore object managing this nat policy, if any. |
| | | * @param[in] fr #LinphoneNatPolicy object |
| | | */ |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LinphoneAccountCreatorStatusWrongActivationCode, /**< Error key doesn't match */ |
| | | LinphoneAccountCreatorStatusPhoneNumberOverused, /**< Error too many SMS sent */ |
| | | LinphoneAccountCreatorStatusAlgoNotSupported, /** < Error algo isn't MD5 or SHA-256 */ |
| | | LinphoneAccountCreatorStatusUnexpectedError, /** < Generic error */ |
| | | } LinphoneAccountCreatorStatus; |
| | | |
| | | /** |
| | |
| | | typedef enum _LinphoneFriendCapability { |
| | | LinphoneFriendCapabilityNone = 0, |
| | | LinphoneFriendCapabilityGroupChat = 1 << 0, |
| | | LinphoneFriendCapabilityLimeX3dh = 1 << 1, |
| | | LinphoneFriendCapabilityEphemeralMessages = 1 << 2 |
| | | LinphoneFriendCapabilityLimeX3dh = 1 << 1 |
| | | } LinphoneFriendCapability; |
| | | |
| | | /** |
| | |
| | | LinphoneLimeMandatory, /**< Lime is always used */ |
| | | LinphoneLimePreferred, /**< Lime is used only if we already shared a secret with remote */ |
| | | } LinphoneLimeState; |
| | | |
| | | /** |
| | | * Session Timers refresher |
| | | * @ingroup initializing |
| | | */ |
| | | typedef enum _LinphoneSessionExpiresRefresher { |
| | | LinphoneSessionExpiresRefresherUnspecified, |
| | | LinphoneSessionExpiresRefresherUAS, |
| | | LinphoneSessionExpiresRefresherUAC |
| | | } LinphoneSessionExpiresRefresher; |
| | | |
| | | /** |
| | | * @ingroup initializing |
| | |
| | | LinphoneReasonAddressIncomplete, /**< Address incomplete */ |
| | | LinphoneReasonNotImplemented, /**< Not implemented */ |
| | | LinphoneReasonBadGateway, /**< Bad gateway */ |
| | | LinphoneReasonSessionIntervalTooSmall, /**< The received request contains a Session-Expires header field with a duration below the minimum timer */ |
| | | LinphoneReasonServerTimeout, /**< Server timeout */ |
| | | LinphoneReasonUnknown /**< Unknown reason */ |
| | | } LinphoneReason; |
| | |
| | | typedef enum _LinphoneXmlRpcArgType { |
| | | LinphoneXmlRpcArgNone, |
| | | LinphoneXmlRpcArgInt, |
| | | LinphoneXmlRpcArgString, |
| | | LinphoneXmlRpcArgStringStruct |
| | | LinphoneXmlRpcArgString |
| | | } LinphoneXmlRpcArgType; |
| | | |
| | | /** |
| | |
| | | * @ingroup misc |
| | | **/ |
| | | typedef struct _LinphoneHeaders LinphoneHeaders; |
| | | |
| | | /** |
| | | * Object holding chat message data received by a push notification |
| | | * @ingroup misc |
| | | **/ |
| | | typedef struct _LinphonePushNotificationMessage LinphonePushNotificationMessage; |
| | | |
| | | #endif /* LINPHONE_TYPES_H_ */ |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | return ""; \ |
| | | } |
| | | |
| | | template<typename T> |
| | | inline char getEnumValueAsString (const T &) { return 0; } |
| | | |
| | | template<typename T> |
| | | struct IsDefinedEnum { |
| | | enum { value = sizeof(getEnumValueAsString(std::declval<T>())) == sizeof(const char *) }; |
| | | }; |
| | | |
| | | //Explicit conversion from enum type to underlying type |
| | | template<typename T> |
| | | constexpr auto to_integral(T e) -> typename std::underlying_type<T>::type |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | CLASS \ |
| | | >::type * \ |
| | | >(getPublic()); |
| | | // ----------------------------------------------------------------------------- |
| | | // Macro. |
| | | // ----------------------------------------------------------------------------- |
| | | |
| | | #define EPHEMERAL_MESSAGE_TASKS_MAX_NB 10 |
| | | |
| | | // ----------------------------------------------------------------------------- |
| | | // Overload. |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC std::string toString (long double val); |
| | | LINPHONE_PUBLIC std::string toString (const void *val); |
| | | |
| | | template<typename T> |
| | | LINPHONE_PUBLIC inline std::string toString (const T &val) { |
| | | std::ostringstream ss; |
| | | ss << val; |
| | | return ss.str(); } |
| | | template<typename T, typename = typename std::enable_if<IsDefinedEnum<T>::value, T>::type> |
| | | LINPHONE_PUBLIC inline std::string toString (const T &val) { return getEnumValueAsString(val); } |
| | | |
| | | LINPHONE_PUBLIC int stoi (const std::string &str, size_t *idx = 0, int base = 10); |
| | | LINPHONE_PUBLIC long long stoll (const std::string &str, size_t *idx = 0, int base = 10); |
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
| | |
| | | LINPHONE_PUBLIC void *linphone_vcard_get_belcard(LinphoneVcard *vcard); |
| | | |
| | | /** |
| | | * Allow multipart on a basic chat room |
| | | * @donotwrap |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_allow_multipart(LinphoneChatRoom *room); |
| | | |
| | | /** |
| | | * Allow cpim on a basic chat room |
| | | * @donotwrap |
| | | */ |
| | | LINPHONE_PUBLIC void linphone_chat_room_allow_cpim(LinphoneChatRoom *room); |
| | | |
| | | /** |
| | | * @} |
| | | */ |
| | | |
old mode 100755
new mode 100644
| | |
| | | |
| | | |
| | | #include "linphone/types.h" |
| | | #include <bctoolbox/map.h> |
| | | |
| | | |
| | | #ifdef __cplusplus |
| | |
| | | * @return The string response to the XML-RPC request. |
| | | **/ |
| | | LINPHONE_PUBLIC const char * linphone_xml_rpc_request_get_string_response(const LinphoneXmlRpcRequest *request); |
| | | |
| | | /** |
| | | * Get the raw response to an XML-RPC request sent with linphone_xml_rpc_session_send_request() and returning http body as string. |
| | | * @param[in] request LinphoneXmlRpcRequest object. |
| | | * @return The string response to the XML-RPC request. |
| | | **/ |
| | | LINPHONE_PUBLIC const char * linphone_xml_rpc_request_get_raw_response(const LinphoneXmlRpcRequest *request); |
| | | |
| | | /** |
| | | * Get the response to an XML-RPC request sent with linphone_xml_rpc_session_send_request() and returning a struct response. |
| | | * @param[in] request LinphoneXmlRpcRequest object. |
| | | * @return The struct response to the XML-RPC request. |
| | | * @donotwrap |
| | | **/ |
| | | const bctbx_map_t* linphone_xml_rpc_request_get_string_struct_response(const LinphoneXmlRpcRequest *request); |
| | | |
| | | /** |
| | | * Create a new #LinphoneXmlRpcSession object. |
| | |
| | | ## |
| | | ## Bundle of CA Root Certificates |
| | | ## |
| | | ## Certificate data from Mozilla as of: Thu Jan 2 08:52:39 2020 |
| | | ## Certificate data from Mozilla as of: Thu Oct 17 07:52:38 2019 |
| | | ## |
| | | ## This is a bundle of X.509 certificates of public Certificate Authorities |
| | | ## (CA). These were automatically extracted from Mozilla's root certificates |
| | |
| | | ## Just configure this file as the SSLCACertificateFile. |
| | | ## |
| | | ## Conversion done with mk-ca-bundle.pl version 1.25. |
| | | ## SHA1: 25845c82ff653e06c98827d68ba4dc149fa65aa2 |
| | | ## SHA1: 4575e6556ebb44c3fb53b56257abe27159707068 |
| | | ## |
| | | |
| | | |
| | |
| | | hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB |
| | | 60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq |
| | | dBb9HxEGmpv0 |
| | | -----END CERTIFICATE----- |
| | | |
| | | Entrust Root Certification Authority - G4 |
| | | ========================================= |
| | | -----BEGIN CERTIFICATE----- |
| | | MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV |
| | | BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu |
| | | bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1 |
| | | dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1 |
| | | dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT |
| | | AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 |
| | | L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv |
| | | cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv |
| | | cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D |
| | | umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV |
| | | 3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds |
| | | 8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ |
| | | e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7 |
| | | ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X |
| | | xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV |
| | | 7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 |
| | | dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW |
| | | Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T |
| | | AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n |
| | | MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q |
| | | jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht |
| | | 7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK |
| | | YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt |
| | | jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+ |
| | | m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW |
| | | RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA |
| | | JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G |
| | | +TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT |
| | | kcpG2om3PVODLAgfi49T3f+sHw== |
| | | -----END CERTIFICATE----- |
| | |
| | | #include <mediastreamer2/msfilter.h> |
| | | #include <jni.h> |
| | | |
| | | enum _DeviceType{ |
| | | TELEPHONY, |
| | | AUX_LINE, |
| | | GENERIC_USB, |
| | | HEADSET, |
| | | MICROPHONE, |
| | | EARPIECE, |
| | | HEADPHONES, |
| | | SPEAKER, |
| | | BLUETOOTH, |
| | | UNKNOWN |
| | | }; |
| | | |
| | | /** |
| | | * Android device type enum. |
| | | **/ |
| | | typedef enum _DeviceType DeviceType; |
| | | |
| | | /** |
| | | * Retrieve preferred sample rate from Mediastreamer Android Context. |
| | | **/ |
| | | int get_preferred_sample_rate(); |
| | | |
| | | /** |
| | | * Retrieve all devices in a given direction. |
| | | * Valid values for string dir are "all" "output" "input" |
| | | **/ |
| | | jobject get_all_devices(JNIEnv *env, const char * dir); |
| | | |
| | | /** |
| | | * Retrieve device ID for the device deviceInfo. |
| | | **/ |
| | | unsigned int get_device_id(JNIEnv *env, jobject deviceInfo); |
| | | |
| | | /** |
| | | * Retrieve the value of a JV class field fieldName. |
| | | **/ |
| | | int getJVIntField(JNIEnv *env, const char * className, const char * fieldName); |
| | | |
| | | /** |
| | | * Retrieve device type for the device deviceInfo. |
| | | **/ |
| | | DeviceType get_device_type(JNIEnv *env, jobject deviceInfo); |
| | | |
| | | /** |
| | | * Retrieve device capabilities (recorder or playback) for the device deviceInfo. |
| | | **/ |
| | | unsigned int get_device_capabilities(JNIEnv *env, jobject deviceInfo); |
| | | |
| | | /** |
| | | * Retrieve product name for the device deviceInfo. |
| | | **/ |
| | | char * get_device_product_name(JNIEnv *env, jobject deviceInfo); |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C"{ |
| | | #endif |
| | |
| | | #define DEVICE_USE_ANDROID_CAMCORDER (1<<9) /* set when the device needs to capture using CAMCORDER instead of Voice communication (I.E kindle fire) */ |
| | | #define DEVICE_MCH264ENC_NO_PIX_FMT_CONV (1<<10) /* set in order to avoid pixel format convervion before MediaCodec H264 encoder input */ |
| | | #define DEVICE_MCH265_LIMIT_DEQUEUE_OF_OUTPUT_BUFFERS (1<<11) /* set in order to avoid calling dequeueOutputBuffers() too often. */ |
| | | #define DEVICE_HAS_CRAPPY_AAUDIO (1<<12) /* set to prevent aaudio plugin to create a soundcard */ |
| | | |
| | | struct SoundDeviceAudioHacks { |
| | | const char *mic_equalizer; |
| | |
| | | MS2_PUBLIC void ice_session_enable_short_turn_refresh(IceSession *session, bool_t enable); |
| | | |
| | | /** |
| | | * Enable TURN protocol. |
| | | * Enable TURN protol. |
| | | * @param session A pointer to a session |
| | | * @param enable A boolean value telling whether to enable TURN protocol or not. |
| | | */ |
| | | MS2_PUBLIC void ice_session_enable_turn(IceSession *session, bool_t enable); |
| | | |
| | | /** |
| | | * Set TURN transport. |
| | | * @param session A pointer to a session |
| | | * @param transport The transport that TURN should use (should be UDP, TCP or TLS). |
| | | */ |
| | | MS2_PUBLIC void ice_session_set_turn_transport(IceSession *session, const char *transport); |
| | | |
| | | /** |
| | | * Set TURN root certificate path when using TLS. |
| | | * @param session A pointer to a session |
| | | * @param root_certificate The path of the root certificate. |
| | | */ |
| | | MS2_PUBLIC void ice_session_set_turn_root_certificate(IceSession *session, const char *root_certificate); |
| | | |
| | | /** |
| | | * Set TURN CN when using TLS. |
| | | * @param session A pointer to a session |
| | | * @param cn The CN. |
| | | */ |
| | | MS2_PUBLIC void ice_session_set_turn_cn(IceSession *session, const char *cn); |
| | | |
| | | MS2_PUBLIC void ice_session_set_stun_auth_requested_cb(IceSession *session, MSStunAuthRequestedCb cb, void *userdata); |
| | | |
| | |
| | | */ |
| | | MS2_PUBLIC bool_t ice_check_list_selected_valid_local_candidate(const IceCheckList *cl, IceCandidate **rtp_candidate, IceCandidate **rtcp_candidate); |
| | | |
| | | /** |
| | | * Get the selected valid base candidate for an ICE check list. |
| | | * |
| | | * @param cl A pointer to a check list |
| | | * @param rtp_candidate A pointer to store the RTP valid local base candidate |
| | | * @param rtcp_candidate A pointer to store the RTCP valid local base candidate |
| | | * @return TRUE if the information have been successfully retrieved, FALSE otherwise |
| | | */ |
| | | MS2_PUBLIC bool_t ice_check_list_selected_valid_local_base_candidate(const IceCheckList *cl, IceCandidate **rtp_candidate, IceCandidate **rtcp_candidate); |
| | | /** |
| | | * Get the selected valid remote candidate for an ICE check list. |
| | | * |
| | |
| | | |
| | | typedef void (*VideoStreamRenderCallback)(void *user_pointer, const MSPicture *local_view, const MSPicture *remote_view); |
| | | typedef void (*VideoStreamEventCallback)(void *user_pointer, const MSFilter *f, const unsigned int event_id, const void *args); |
| | | typedef void (*VideoStreamCameraNotWorkingCallback)(void *user_pointer, const MSWebCam *old_webcam); |
| | | |
| | | struct _MediastreamVideoStat |
| | | { |
| | |
| | | int device_orientation; /* warning: meaning of this variable depends on the platform (Android, iOS, ...) */ |
| | | uint64_t last_reported_decoding_error_time; |
| | | uint64_t last_fps_check; |
| | | uint64_t last_camera_check; |
| | | int dead_camera_check_count; |
| | | VideoStreamCameraNotWorkingCallback cameracb; |
| | | void *camera_pointer; |
| | | MediaStreamVideoStat ms_video_stat; |
| | | bool_t use_preview_window; |
| | | bool_t enable_qrcode_decoder; |
| | | bool_t freeze_on_error; |
| | | bool_t display_filter_auto_rotate_enabled; |
| | | |
| | | bool_t source_performs_encoding; |
| | | |
| | | bool_t output_performs_decoding; |
| | | bool_t player_active; |
| | | bool_t staticimage_webcam_fps_optimization; /* if TRUE, the StaticImage webcam will ignore the fps target in order to save CPU time. Default is TRUE */ |
| | |
| | | } |
| | | MS2_PUBLIC void video_stream_set_render_callback(VideoStream *s, VideoStreamRenderCallback cb, void *user_pointer); |
| | | MS2_PUBLIC void video_stream_set_event_callback(VideoStream *s, VideoStreamEventCallback cb, void *user_pointer); |
| | | MS2_PUBLIC void video_stream_set_camera_not_working_callback(VideoStream *s, VideoStreamCameraNotWorkingCallback cb, void *user_pointer); |
| | | MS2_PUBLIC void video_stream_set_display_filter_name(VideoStream *s, const char *fname); |
| | | MS2_PUBLIC int video_stream_start_with_source(VideoStream *stream, RtpProfile *profile, const char *rem_rtp_ip, int rem_rtp_port, |
| | | const char *rem_rtcp_ip, int rem_rtcp_port, int payload, int jitt_comp, MSWebCam* cam, MSFilter* source); |
| | |
| | | * @} |
| | | **/ |
| | | |
| | | MS2_PUBLIC void update_bitrate_limit_from_tmmbr(MediaStream *obj, int br_limit); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | #define MS2_WINDOWS_DESKTOP 1 |
| | | #endif |
| | | #endif |
| | | |
| | | #ifdef ENABLE_MICROSOFT_STORE_APP |
| | | _Check_return_ WINOLEAPI |
| | | CoCreateInstanceFromApp( |
| | | _In_ REFCLSID Clsid, |
| | | _In_opt_ IUnknown* punkOuter, |
| | | _In_ DWORD dwClsCtx, |
| | | _In_opt_ PVOID reserved, |
| | | _In_ DWORD dwCount, |
| | | _Inout_updates_(dwCount) MULTI_QI* pResults |
| | | ); |
| | | #endif |
| | | __inline _Check_return_ HRESULT CoCreateInstanceBT( |
| | | _In_ REFCLSID rclsid, |
| | | _In_opt_ LPUNKNOWN pUnkOuter, |
| | | _In_ DWORD dwClsContext, |
| | | _In_ REFIID riid, |
| | | _COM_Outptr_ _At_(*ppv, _Post_readable_size_(_Inexpressible_(varies))) LPVOID FAR* ppv) |
| | | { |
| | | #ifdef ENABLE_MICROSOFT_STORE_APP |
| | | MULTI_QI OneQI; |
| | | HRESULT hr; |
| | | |
| | | OneQI.pItf = NULL; |
| | | |
| | | #ifdef __cplusplus |
| | | OneQI.pIID = &riid; |
| | | #else |
| | | OneQI.pIID = riid; |
| | | #endif |
| | | |
| | | hr = CoCreateInstanceFromApp( rclsid, pUnkOuter, dwClsContext, NULL, 1, &OneQI ); |
| | | |
| | | #ifdef _PREFAST_ |
| | | if (SUCCEEDED(hr) && SUCCEEDED(OneQI.hr)) |
| | | _Analysis_assume_(OneQI.pItf != NULL); |
| | | else |
| | | _Analysis_assume_(OneQI.pItf == NULL); |
| | | #endif |
| | | |
| | | *ppv = OneQI.pItf; |
| | | return FAILED(hr) ? hr : OneQI.hr; |
| | | #else |
| | | return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv ); |
| | | #endif //ENABLE_MICROSOFT_STORE_APP |
| | | } |
| | | |
| | | __inline _Check_return_ HRESULT CoCreateInstanceExBT( |
| | | _In_ REFCLSID Clsid, |
| | | _In_opt_ IUnknown * punkOuter, |
| | | _In_ DWORD dwClsCtx, |
| | | _In_opt_ COSERVERINFO * pServerInfo, |
| | | _In_ DWORD dwCount, |
| | | _Inout_updates_(dwCount) MULTI_QI *pResults ) |
| | | { |
| | | #ifdef ENABLE_MICROSOFT_STORE_APP |
| | | return CoCreateInstanceFromApp(Clsid, punkOuter, dwClsCtx, pServerInfo, dwCount, pResults); |
| | | #else |
| | | return CoCreateInstanceEx(Clsid, punkOuter, dwClsCtx, pServerInfo, dwCount, pResults); |
| | | #endif //ENABLE_MICROSOFT_STORE_APP |
| | | } |
| | | #endif |
| | | |
| | | #if defined(_MSC_VER) |
| | |
| | | #define MS_FILTER_SET_MTU MS_FILTER_BASE_METHOD(9,int) |
| | | #define MS_FILTER_GET_MTU MS_FILTER_BASE_METHOD(10,int) |
| | | /**Filters can return their latency in milliseconds (if known) using this method:*/ |
| | | #define MS_FILTER_GET_LATENCY MS_FILTER_BASE_METHOD(11,int) |
| | | |
| | | /** |
| | | * Set device ID |
| | | */ |
| | | #define MS_FILTER_SET_DEVICE_ID MS_FILTER_BASE_METHOD(12,int) |
| | | /** |
| | | * Get device ID |
| | | */ |
| | | #define MS_FILTER_GET_DEVICE_ID MS_FILTER_BASE_METHOD(13,int) |
| | | |
| | | #define MS_FILTER_GET_LATENCY MS_FILTER_BASE_METHOD(11,int) |
| | | |
| | | typedef struct _MSPinFormat{ |
| | | uint16_t pin; |
| | |
| | | #define TS_REDGEN 2 |
| | | #define TS_NUMBER_OF_OUTBUF TS_REDGEN + 1 |
| | | #define TS_INBUF_SIZE TS_OUTBUF_SIZE * TS_NUMBER_OF_OUTBUF |
| | | #define TS_KEEP_ALIVE_INTERVAL 25000 //10000 |
| | | #define TS_SEND_INTERVAL 299 |
| | | |
| | | #define MS_RTT_4103_SOURCE_SET_T140_PAYLOAD_TYPE_NUMBER MS_FILTER_METHOD(MS_RTT_4103_SOURCE_ID, 0, int) |
| | |
| | | #define MS_RTT_4103_SOURCE_SET_RED_PAYLOAD_TYPE_NUMBER MS_FILTER_METHOD(MS_RTT_4103_SOURCE_ID, 1, int) |
| | | #define MS_RTT_4103_SINK_SET_RED_PAYLOAD_TYPE_NUMBER MS_FILTER_METHOD(MS_RTT_4103_SINK_ID, 1, int) |
| | | #define MS_RTT_4103_SOURCE_PUT_CHAR32 MS_FILTER_METHOD(MS_RTT_4103_SOURCE_ID, 2, uint32_t) |
| | | #define MS_RTT_4103_SOURCE_SET_KEEP_ALIVE_INTERVAL MS_FILTER_METHOD(MS_RTT_4103_SOURCE_ID, 3, unsigned int) |
| | | |
| | | typedef struct _RealtimeTextReceivedCharacter { |
| | | uint32_t character; |
| | |
| | | typedef struct _MSSndCard * (*MSSndCardDuplicateFunc)(struct _MSSndCard *obj); |
| | | typedef void (*MSSndCardSetUsageHintFunc)(struct _MSSndCard *obj, bool_t is_going_to_be_used); |
| | | typedef void (*MSSndCardUnloadFunc)(MSSndCardManager *obj); |
| | | typedef void (*MSSndCardAudioSessionFunc)(struct _MSSndCard *obj, bool_t actived); |
| | | typedef void (*MSSndCardCallKitFunc)(struct _MSSndCard *obj, bool_t enabled); |
| | | |
| | | |
| | | struct _MSSndCardDesc{ |
| | |
| | | MSSndCardDuplicateFunc duplicate; |
| | | MSSndCardUnloadFunc unload; |
| | | MSSndCardSetUsageHintFunc usage_hint; |
| | | MSSndCardAudioSessionFunc audio_session_activated; |
| | | MSSndCardCallKitFunc callkit_enabled; |
| | | }; |
| | | |
| | | /** |
| | |
| | | enum _MSSndCardStreamType{ |
| | | MS_SND_CARD_STREAM_VOICE, |
| | | MS_SND_CARD_STREAM_RING, |
| | | MS_SND_CARD_STREAM_MEDIA, |
| | | MS_SND_CARD_STREAM_DTMF, |
| | | MS_SND_CARD_STREAM_MEDIA |
| | | }; |
| | | |
| | | /** |
| | |
| | | * This is recommended for cards which are known to be slow (see flag MS_SND_CARD_CAP_IS_SLOW ). |
| | | **/ |
| | | MS2_PUBLIC void ms_snd_card_set_usage_hint(MSSndCard *obj, bool_t is_going_to_be_used); |
| | | |
| | | /** |
| | | * Used by application to notify whether audio access is allowed for the process. |
| | | * On most platform this function is useless, but in an iOS application using Callkit, the system decides when audio (through the AVAudioSession singleton) is open or closed. |
| | | * Such application needs to explicitely notify mediastreamer2 with ms_snd_card_notify_audio_session_activated() about the state of the audio session. |
| | | * |
| | | * @param obj A sound card object. |
| | | * @param actived TRUE if audio session is activated, FALSE otherwise. |
| | | */ |
| | | MS2_PUBLIC void ms_snd_card_notify_audio_session_activated(MSSndCard *obj, bool_t activated); |
| | | |
| | | /** |
| | | * Used by application to tell the MSSndCard if rely on notifications of activation of audio session. |
| | | * When yesno is set to FALSE, the MSSndCard will not rely on notifications of activation of audio session, and will assume that audio is always usable. |
| | | * If set to TRUE, the mediastreamer2 will require explicit calls to ms_snd_card_notify_audio_session_activated(). |
| | | * |
| | | * @param obj A sound card object. |
| | | * @param yesno TRUE if app notifies is activated, FALSE otherwise. The default value is FALSE. |
| | | */ |
| | | MS2_PUBLIC void ms_snd_card_app_notifies_activation(MSSndCard *obj, bool_t yesno); |
| | | |
| | | /** |
| | | * Sets the stream type for this soundcard, default is VOICE |
| | |
| | | const uint8_t *srcbuf, int srclsz, MSVideoSize roi); |
| | | |
| | | MS2_PUBLIC MSYuvBufAllocator *ms_yuv_buf_allocator_new(void); |
| | | /* Set a maximum number of frames mananaged by the YuvBufAllocator. |
| | | * Only frames satisfying the w / h size request are counted. |
| | | */ |
| | | MS2_PUBLIC void ms_yuv_buf_allocator_set_max_frames(MSYuvBufAllocator *obj, int max_frames); |
| | | MS2_PUBLIC mblk_t *ms_yuv_buf_allocator_get(MSYuvBufAllocator *obj, MSPicture *buf, int w, int h); |
| | | MS2_PUBLIC void ms_yuv_buf_allocator_free(MSYuvBufAllocator *obj); |
| | | |
| | |
| | | |
| | | typedef struct _Rfc3984Context Rfc3984Context; |
| | | |
| | | MS2_DEPRECATED MS2_PUBLIC Rfc3984Context *rfc3984_new(void); |
| | | MS2_PUBLIC Rfc3984Context *rfc3984_new_with_factory(MSFactory *factory); |
| | | |
| | | MS2_PUBLIC void rfc3984_destroy(Rfc3984Context *ctx); |
| | |
| | | MS_TURN_CONTEXT_TYPE_RTCP |
| | | } MSTurnContextType; |
| | | |
| | | typedef enum { |
| | | MS_TURN_CONTEXT_TRANSPORT_UDP, |
| | | MS_TURN_CONTEXT_TRANSPORT_TCP, |
| | | MS_TURN_CONTEXT_TRANSPORT_TLS |
| | | } MSTurnContextTransport; |
| | | |
| | | typedef struct { |
| | | uint32_t nb_send_indication; |
| | | uint32_t nb_data_indication; |
| | |
| | | char *username; |
| | | char *password; |
| | | char *ha1; |
| | | char *root_certificate; |
| | | uint32_t lifetime; |
| | | uint16_t channel_number; |
| | | MSTurnContextState state; |
| | | MSTurnContextType type; |
| | | MSTurnContextTransport transport; |
| | | MSStunAddress relay_addr; |
| | | struct sockaddr_storage turn_server_addr; |
| | | socklen_t turn_server_addrlen; |
| | | bool_t force_rtp_sending_via_relay; |
| | | MSTurnContextStatistics stats; |
| | | struct _MSTurnTCPClient *turn_tcp_client; |
| | | char *cn; |
| | | } MSTurnContext; |
| | | |
| | | |
| | |
| | | MS2_PUBLIC void ms_turn_context_set_server_addr(MSTurnContext *context, struct sockaddr *addr, socklen_t addrlen); |
| | | MS2_PUBLIC MSTurnContextState ms_turn_context_get_state(const MSTurnContext *context); |
| | | MS2_PUBLIC void ms_turn_context_set_state(MSTurnContext *context, MSTurnContextState state); |
| | | MS2_PUBLIC MSTurnContextTransport ms_turn_get_transport_from_string(const char *transport); |
| | | MS2_PUBLIC MSTurnContextTransport ms_turn_context_get_transport(const MSTurnContext *context); |
| | | MS2_PUBLIC void ms_turn_context_set_transport(MSTurnContext *context, MSTurnContextTransport transport); |
| | | MS2_PUBLIC const char * ms_turn_context_get_realm(const MSTurnContext *context); |
| | | MS2_PUBLIC void ms_turn_context_set_realm(MSTurnContext *context, const char *realm); |
| | | MS2_PUBLIC const char * ms_turn_context_get_nonce(const MSTurnContext *context); |
| | |
| | | MS2_PUBLIC void ms_turn_context_set_channel_number(MSTurnContext *context, uint16_t channel_number); |
| | | MS2_PUBLIC void ms_turn_context_set_allocated_relay_addr(MSTurnContext *context, MSStunAddress relay_addr); |
| | | MS2_PUBLIC void ms_turn_context_set_force_rtp_sending_via_relay(MSTurnContext *context, bool_t force); |
| | | MS2_PUBLIC void ms_turn_context_set_root_certificate(MSTurnContext *context, const char *root_certificate); |
| | | MS2_PUBLIC void ms_turn_context_set_cn(MSTurnContext *context, const char *cn); |
| | | MS2_PUBLIC bool_t ms_turn_context_peer_address_allowed(const MSTurnContext *context, const MSStunAddress *peer_address); |
| | | MS2_PUBLIC void ms_turn_context_allow_peer_address(MSTurnContext *context, const MSStunAddress *peer_address); |
| | | MS2_PUBLIC RtpTransport * ms_turn_context_create_endpoint(MSTurnContext *context); |
| | | |
| | | typedef struct _MSTurnTCPClient MSTurnTCPClient; |
| | | |
| | | MS2_PUBLIC MSTurnTCPClient* ms_turn_tcp_client_new(MSTurnContext *context, bool_t use_ssl, const char* root_certificate_path); |
| | | MS2_PUBLIC void ms_turn_tcp_client_destroy(MSTurnTCPClient *turn_tcp_client); |
| | | |
| | | MS2_PUBLIC void ms_turn_tcp_client_connect(MSTurnTCPClient *turn_tcp_client); |
| | | |
| | | MS2_PUBLIC int ms_turn_tcp_client_recvfrom(MSTurnTCPClient *turn_tcp_client, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen); |
| | | MS2_PUBLIC int ms_turn_tcp_client_sendto(MSTurnTCPClient *turn_tcp_client, mblk_t *msg, int flags, const struct sockaddr *to, socklen_t tolen); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * File: b64/b64.h
|
| | | *
|
| | | * Purpose: Header file for the b64 library
|
| | | *
|
| | | * Created: 18th October 2004
|
| | | * Updated: 24th August 2008
|
| | | *
|
| | | * Thanks: To Adam McLaurin, for ideas regarding the b64_decode2() and
|
| | | * b64_encode2().
|
| | | *
|
| | | * Home: http://synesis.com.au/software/
|
| | | *
|
| | | * Copyright (c) 2004-2008, Matthew Wilson and Synesis Software
|
| | | * All rights reserved.
|
| | | *
|
| | | * Redistribution and use in source and binary forms, with or without
|
| | | * modification, are permitted provided that the following conditions are met:
|
| | | *
|
| | | * - Redistributions of source code must retain the above copyright notice, this
|
| | | * list of conditions and the following disclaimer.
|
| | | * - Redistributions in binary form must reproduce the above copyright notice,
|
| | | * this list of conditions and the following disclaimer in the documentation
|
| | | * and/or other materials provided with the distribution.
|
| | | * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
|
| | | * any contributors may be used to endorse or promote products derived from
|
| | | * this software without specific prior written permission.
|
| | | *
|
| | | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| | | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| | | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| | | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
| | | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
| | | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
| | | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
| | | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
| | | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
| | | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| | | * POSSIBILITY OF SUCH DAMAGE.
|
| | | *
|
| | | * ////////////////////////////////////////////////////////////////////////// */
|
| | |
|
| | |
|
| | | /** \file ortp/b64.h
|
| | | *
|
| | | * \brief [C/C++] Header file for the b64 library.
|
| | | */
|
| | |
|
| | | #ifndef B64_INCL_B64_H_B64
|
| | | #define B64_INCL_B64_H_B64
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Version information
|
| | | */
|
| | |
|
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION
|
| | | # define B64_VER_B64_H_B64_MAJOR 1
|
| | | # define B64_VER_B64_H_B64_MINOR 5
|
| | | # define B64_VER_B64_H_B64_REVISION 4
|
| | | # define B64_VER_B64_H_B64_EDIT 28
|
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */
|
| | |
|
| | | /** \def B64_VER_MAJOR
|
| | | * The major version number of b64
|
| | | */
|
| | |
|
| | | /** \def B64_VER_MINOR
|
| | | * The minor version number of b64
|
| | | */
|
| | |
|
| | | /** \def B64_VER_REVISION
|
| | | * The revision version number of b64
|
| | | */
|
| | |
|
| | | /** \def B64_VER
|
| | | * The current composite version number of b64
|
| | | */
|
| | |
|
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION
|
| | | # define B64_VER_1_0_1 0x01000100
|
| | | # define B64_VER_1_0_2 0x01000200
|
| | | # define B64_VER_1_0_3 0x01000300
|
| | | # define B64_VER_1_1_1 0x01010100
|
| | | # define B64_VER_1_1_2 0x01010200
|
| | | # define B64_VER_1_1_3 0x01010300
|
| | | # define B64_VER_1_2_1 0x01020100
|
| | | # define B64_VER_1_2_2 0x01020200
|
| | | # define B64_VER_1_2_3 0x01020300
|
| | | # define B64_VER_1_2_4 0x01020400
|
| | | # define B64_VER_1_2_5 0x01020500
|
| | | # define B64_VER_1_2_6 0x01020600
|
| | | # define B64_VER_1_2_7 0x01020700
|
| | | # define B64_VER_1_3_1 0x010301ff
|
| | | # define B64_VER_1_3_2 0x010302ff
|
| | | # define B64_VER_1_3_3 0x010303ff
|
| | | # define B64_VER_1_3_4 0x010304ff
|
| | |
|
| | | # define B64_VER B64_VER_1_3_4
|
| | | #else /* ? B64_DOCUMENTATION_SKIP_SECTION */
|
| | | # define B64_VER 0x010304ff
|
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */
|
| | |
|
| | | #define B64_VER_MAJOR 1
|
| | | #define B64_VER_MINOR 3
|
| | | #define B64_VER_REVISION 4
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Includes
|
| | | */
|
| | |
|
| | | #include <stddef.h>
|
| | | #include "ortp/port.h"
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Namespace
|
| | | */
|
| | |
|
| | | #if !defined(B64_NO_NAMESPACE) && \
|
| | | !defined(__cplusplus)
|
| | | # define B64_NO_NAMESPACE
|
| | | #endif /* !B64_NO_NAMESPACE && !__cplusplus */
|
| | |
|
| | | #ifdef B64_NAMESPACE
|
| | | # undef B64_NAMESPACE
|
| | | #endif /* B64_NAMESPACE */
|
| | |
|
| | | #ifdef B64_NAMESPACE_QUALIFIER
|
| | | # undef B64_NAMESPACE_QUALIFIER
|
| | | #endif /* B64_NAMESPACE_QUALIFIER */
|
| | |
|
| | |
|
| | | #ifndef B64_NO_NAMESPACE
|
| | |
|
| | | # ifdef B64_CUSTOM_NAMESPACE
|
| | | # define B64_NAMESPACE B64_CUSTOM_NAMESPACE
|
| | | # else /* ? B64_CUSTOM_NAMESPACE */
|
| | | # define B64_NAMESPACE b64
|
| | | # endif /* B64_CUSTOM_NAMESPACE */
|
| | |
|
| | | # if defined(B64_CUSTOM_NAMESPACE) && \
|
| | | defined(B64_CUSTOM_NAMESPACE_QUALIFIER)
|
| | | # define B64_NAMESPACE_QUALIFIER B64_CUSTOM_NAMESPACE_QUALIFIER
|
| | | # else /* B64_CUSTOM_NAMESPACE && B64_CUSTOM_NAMESPACE_QUALIFIER */
|
| | | # define B64_NAMESPACE_QUALIFIER ::B64_NAMESPACE
|
| | | # endif /* B64_CUSTOM_NAMESPACE && B64_CUSTOM_NAMESPACE_QUALIFIER */
|
| | |
|
| | |
|
| | | /** \brief [C/C++] The b64 namespace, within which the core library types and functions
|
| | | * reside in C++ compilation. In C compilation, they all reside in the global
|
| | | * namespace.
|
| | | *
|
| | | * \htmlonly
|
| | | * <hr>
|
| | | * \endhtmlonly
|
| | | */
|
| | | namespace B64_NAMESPACE
|
| | | {
|
| | | #endif /* !B64_NO_NAMESPACE */
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Enumerations
|
| | | */
|
| | |
|
| | | /** \brief Return codes (from b64_encode2() / b64_decode2())
|
| | | */
|
| | | enum B64_RC
|
| | | {
|
| | | B64_RC_OK = 0 /*!< Operation was successful. */
|
| | | , B64_RC_INSUFFICIENT_BUFFER = 1 /*!< The given translation buffer was not of sufficient size. */
|
| | | , B64_RC_TRUNCATED_INPUT = 2 /*!< The input did not represent a fully formed stream of octet couplings. */
|
| | | , B64_RC_DATA_ERROR = 3 /*!< Invalid data. */
|
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION
|
| | | , B64_max_RC_value
|
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */
|
| | | };
|
| | |
|
| | | #ifndef __cplusplus
|
| | | typedef enum B64_RC B64_RC;
|
| | | #endif /* !__cplusplus */
|
| | |
|
| | | /** \brief Coding behaviour modification flags (for b64_encode2() / b64_decode2())
|
| | | */
|
| | | enum B64_FLAGS
|
| | | {
|
| | | B64_F_LINE_LEN_USE_PARAM = 0x0000 /*!< Uses the lineLen parameter to b64_encode2(). Ignored by b64_decode2(). */
|
| | | , B64_F_LINE_LEN_INFINITE = 0x0001 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is infinite. Ignored by b64_decode2(). */
|
| | | , B64_F_LINE_LEN_64 = 0x0002 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is 64. Ignored by b64_decode2(). */
|
| | | , B64_F_LINE_LEN_76 = 0x0003 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is 76. Ignored by b64_decode2(). */
|
| | | , B64_F_LINE_LEN_MASK = 0x000f /*!< Mask for testing line length flags to b64_encode2(). Ignored by b64_encode2(). */
|
| | | , B64_F_STOP_ON_NOTHING = 0x0000 /*!< Decoding ignores all invalid characters in the input data. Ignored by b64_encode2(). */
|
| | | , B64_F_STOP_ON_UNKNOWN_CHAR = 0x0100 /*!< Causes decoding to break if any non-Base-64 [a-zA-Z0-9=+/], non-whitespace character is encountered. Ignored by b64_encode2(). */
|
| | | , B64_F_STOP_ON_UNEXPECTED_WS = 0x0200 /*!< Causes decoding to break if any unexpected whitespace is encountered. Ignored by b64_encode2(). */
|
| | | , B64_F_STOP_ON_BAD_CHAR = 0x0300 /*!< Causes decoding to break if any non-Base-64 [a-zA-Z0-9=+/] character is encountered. Ignored by b64_encode2(). */
|
| | | };
|
| | |
|
| | | #ifndef __cplusplus
|
| | | typedef enum B64_FLAGS B64_FLAGS;
|
| | | #endif /* !__cplusplus */
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Functions
|
| | | */
|
| | |
|
| | | #ifdef __cplusplus
|
| | | extern "C" {
|
| | | #endif /* __cplusplus */
|
| | |
|
| | | /** \brief Encodes a block of binary data into Base-64
|
| | | *
|
| | | * \param src Pointer to the block to be encoded. May not be NULL, except when
|
| | | * \c dest is NULL, in which case it is ignored.
|
| | | * \param srcSize Length of block to be encoded
|
| | | * \param dest Pointer to the buffer into which the result is to be written. May
|
| | | * be NULL, in which case the function returns the required length
|
| | | * \param destLen Length of the buffer into which the result is to be written. Must
|
| | | * be at least as large as that indicated by the return value from
|
| | | * \link b64::b64_encode b64_encode(NULL, srcSize, NULL, 0)\endlink.
|
| | | *
|
| | | * \return 0 if the size of the buffer was insufficient, or the length of the
|
| | | * converted buffer was longer than \c destLen
|
| | | *
|
| | | * \note The function returns the required length if \c dest is NULL
|
| | | *
|
| | | * \note The function returns the required length if \c dest is NULL. The returned size
|
| | | * might be larger than the actual required size, but will never be smaller.
|
| | | *
|
| | | * \note Threading: The function is fully re-entrant.
|
| | | *
|
| | | * \see b64::encode()
|
| | | */
|
| | | ORTP_PUBLIC size_t b64_encode(void const *src, size_t srcSize, char *dest, size_t destLen);
|
| | |
|
| | | /** \brief Encodes a block of binary data into Base-64
|
| | | *
|
| | | * \param src Pointer to the block to be encoded. May not be NULL, except when
|
| | | * \c dest is NULL, in which case it is ignored.
|
| | | * \param srcSize Length of block to be encoded
|
| | | * \param dest Pointer to the buffer into which the result is to be written. May
|
| | | * be NULL, in which case the function returns the required length
|
| | | * \param destLen Length of the buffer into which the result is to be written. Must
|
| | | * be at least as large as that indicated by the return value from
|
| | | * \link b64::b64_encode2 b64_encode2(NULL, srcSize, NULL, 0, flags, lineLen, rc)\endlink.
|
| | | * \param flags A combination of the B64_FLAGS enumeration, that moderate the
|
| | | * behaviour of the function
|
| | | * \param lineLen If the flags parameter contains B64_F_LINE_LEN_USE_PARAM, then
|
| | | * this parameter represents the length of the lines into which the encoded form is split,
|
| | | * with a hard line break ('\\r\\n'). If this value is 0, then the line is not
|
| | | * split. If it is <0, then the RFC-1113 recommended line length of 64 is used
|
| | | * \param rc The return code representing the status of the operation. May be NULL.
|
| | | *
|
| | | * \return 0 if the size of the buffer was insufficient, or the length of the
|
| | | * converted buffer was longer than \c destLen
|
| | | *
|
| | | * \note The function returns the required length if \c dest is NULL. The returned size
|
| | | * might be larger than the actual required size, but will never be smaller.
|
| | | *
|
| | | * \note Threading: The function is fully re-entrant.
|
| | | *
|
| | | * \see b64::encode()
|
| | | */
|
| | | size_t b64_encode2( void const *src
|
| | | , size_t srcSize
|
| | | , char *dest
|
| | | , size_t destLen
|
| | | , unsigned flags
|
| | | , int lineLen /* = 0 */
|
| | | , B64_RC *rc /* = NULL */);
|
| | |
|
| | | /** \brief Decodes a sequence of Base-64 into a block of binary data
|
| | | *
|
| | | * \param src Pointer to the Base-64 block to be decoded. May not be NULL, except when
|
| | | * \c dest is NULL, in which case it is ignored. If \c dest is NULL, and \c src is
|
| | | * <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value
|
| | | * is returned that is guaranteed to be large enough to hold the decoded block.
|
| | | *
|
| | | * \param srcLen Length of block to be encoded. Must be an integral of 4, the Base-64
|
| | | * encoding quantum, otherwise the Base-64 block is assumed to be invalid
|
| | | * \param dest Pointer to the buffer into which the result is to be written. May
|
| | | * be NULL, in which case the function returns the required length
|
| | | * \param destSize Length of the buffer into which the result is to be written. Must
|
| | | * be at least as large as that indicated by the return value from
|
| | | * \c b64_decode(src, srcSize, NULL, 0), even in the case where the encoded form
|
| | | * contains a number of characters that will be ignored, resulting in a lower total
|
| | | * length of converted form.
|
| | | *
|
| | | * \return 0 if the size of the buffer was insufficient, or the length of the
|
| | | * converted buffer was longer than \c destSize
|
| | | *
|
| | | * \note The function returns the required length if \c dest is NULL. The returned size
|
| | | * might be larger than the actual required size, but will never be smaller.
|
| | | *
|
| | | * \note \anchor anchor__4_characters The behaviour of both
|
| | | * \link b64::b64_encode2 b64_encode2()\endlink
|
| | | * and
|
| | | * \link b64::b64_decode2 b64_decode2()\endlink
|
| | | * are undefined if the line length is not a multiple of 4.
|
| | | *
|
| | | * \note Threading: The function is fully re-entrant.
|
| | | *
|
| | | * \see b64::decode()
|
| | | */
|
| | | ORTP_PUBLIC size_t b64_decode(char const *src, size_t srcLen, void *dest, size_t destSize);
|
| | |
|
| | | /** \brief Decodes a sequence of Base-64 into a block of binary data
|
| | | *
|
| | | * \param src Pointer to the Base-64 block to be decoded. May not be NULL, except when
|
| | | * \c dest is NULL, in which case it is ignored. If \c dest is NULL, and \c src is
|
| | | * <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value
|
| | | * is returned that is guaranteed to be large enough to hold the decoded block.
|
| | | *
|
| | | * \param srcLen Length of block to be encoded. Must be an integral of 4, the Base-64
|
| | | * encoding quantum, otherwise the Base-64 block is assumed to be invalid
|
| | | * \param dest Pointer to the buffer into which the result is to be written. May
|
| | | * be NULL, in which case the function returns the required length
|
| | | * \param destSize Length of the buffer into which the result is to be written. Must
|
| | | * be at least as large as that indicated by the return value from
|
| | | * \c b64_decode(src, srcSize, NULL, 0), even in the case where the encoded form
|
| | | * contains a number of characters that will be ignored, resulting in a lower total
|
| | | * length of converted form.
|
| | | * \param flags A combination of the B64_FLAGS enumeration, that moderate the
|
| | | * behaviour of the function.
|
| | | * \param rc The return code representing the status of the operation. May be NULL.
|
| | | * \param badChar If the flags parameter does not contain B64_F_STOP_ON_NOTHING, this
|
| | | * parameter specifies the address of a pointer that will be set to point to any
|
| | | * character in the sequence that stops the parsing, as dictated by the flags
|
| | | * parameter. May be NULL.
|
| | | *
|
| | | * \return 0 if the size of the buffer was insufficient, or the length of the
|
| | | * converted buffer was longer than \c destSize, or a bad character stopped parsing.
|
| | | *
|
| | | * \note The function returns the required length if \c dest is NULL. The returned size
|
| | | * might be larger than the actual required size, but will never be smaller.
|
| | | *
|
| | | * \note The behaviour of both
|
| | | * \link b64::b64_encode2 b64_encode2()\endlink
|
| | | * and
|
| | | * \link b64::b64_decode2 b64_decode2()\endlink
|
| | | * are undefined if the line length is not a multiple of 4.
|
| | | *
|
| | | * \note Threading: The function is fully re-entrant.
|
| | | *
|
| | | * \see b64::decode()
|
| | | */
|
| | | size_t b64_decode2( char const *src
|
| | | , size_t srcLen
|
| | | , void *dest
|
| | | , size_t destSize
|
| | | , unsigned flags
|
| | | , char const **badChar /* = NULL */
|
| | | , B64_RC *rc /* = NULL */);
|
| | |
|
| | |
|
| | | /** \brief Returns the textual description of the error
|
| | | *
|
| | | * \param code The \link b64::B64_RC error code\endlink
|
| | | */
|
| | | char const *b64_getErrorString(B64_RC code);
|
| | |
|
| | | /** \brief Returns the length of the textual description of the error
|
| | | *
|
| | | * \see b64_getErrorString()
|
| | | *
|
| | | * \param code The \link b64::B64_RC error code\endlink
|
| | | */
|
| | | size_t b64_getErrorStringLength(B64_RC code);
|
| | |
|
| | |
|
| | | #ifdef __cplusplus
|
| | | } /* extern "C" */
|
| | | #endif /* __cplusplus */
|
| | |
|
| | | /* /////////////////////////////////////////////////////////////////////////////
|
| | | * Namespace
|
| | | */
|
| | |
|
| | | #ifndef B64_NO_NAMESPACE
|
| | | } /* namespace B64_NAMESPACE */
|
| | |
|
| | | # ifndef B64_DOCUMENTATION_SKIP_SECTION
|
| | |
|
| | | namespace stlsoft
|
| | | {
|
| | |
|
| | | inline char const *c_str_data_a( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code);
|
| | | }
|
| | | inline char const *c_str_data( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code);
|
| | | }
|
| | |
|
| | | inline size_t c_str_len_a( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorStringLength(code);
|
| | | }
|
| | | inline size_t c_str_len( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorStringLength(code);
|
| | | }
|
| | |
|
| | | inline char const *c_str_ptr_a( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code);
|
| | | }
|
| | | inline char const *c_str_ptr( B64_NAMESPACE_QUALIFIER::B64_RC code)
|
| | | {
|
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code);
|
| | | }
|
| | |
|
| | | } /* namespace stlsoft */
|
| | |
|
| | | # endif /* !B64_DOCUMENTATION_SKIP_SECTION */
|
| | |
|
| | | #endif /* !B64_NO_NAMESPACE */
|
| | |
|
| | | /* ////////////////////////////////////////////////////////////////////////// */
|
| | |
|
| | | #endif /* B64_INCL_B64_H_B64 */
|
| | |
|
| | | /* ////////////////////////////////////////////////////////////////////////// */
|
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * File: b64/b64.h |
| | | * |
| | | * Purpose: Header file for the b64 library |
| | | * |
| | | * Created: 18th October 2004 |
| | | * Updated: 24th August 2008 |
| | | * |
| | | * Thanks: To Adam McLaurin, for ideas regarding the b64_decode2() and |
| | | * b64_encode2(). |
| | | * |
| | | * Home: http://synesis.com.au/software/ |
| | | * |
| | | * Copyright (c) 2004-2008, Matthew Wilson and Synesis Software |
| | | * All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * - Redistributions of source code must retain the above copyright notice, this |
| | | * list of conditions and the following disclaimer. |
| | | * - Redistributions in binary form must reproduce the above copyright notice, |
| | | * this list of conditions and the following disclaimer in the documentation |
| | | * and/or other materials provided with the distribution. |
| | | * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of |
| | | * any contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * |
| | | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| | | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| | | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| | | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| | | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| | | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| | | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| | | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| | | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| | | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| | | * POSSIBILITY OF SUCH DAMAGE. |
| | | * |
| | | * ////////////////////////////////////////////////////////////////////////// */ |
| | | |
| | | |
| | | /** \file ortp/b64.h |
| | | * |
| | | * \brief [C/C++] Header file for the b64 library. |
| | | */ |
| | | |
| | | #ifndef B64_INCL_B64_H_B64 |
| | | #define B64_INCL_B64_H_B64 |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Version information |
| | | */ |
| | | |
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION |
| | | # define B64_VER_B64_H_B64_MAJOR 1 |
| | | # define B64_VER_B64_H_B64_MINOR 5 |
| | | # define B64_VER_B64_H_B64_REVISION 4 |
| | | # define B64_VER_B64_H_B64_EDIT 28 |
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */ |
| | | |
| | | /** \def B64_VER_MAJOR |
| | | * The major version number of b64 |
| | | */ |
| | | |
| | | /** \def B64_VER_MINOR |
| | | * The minor version number of b64 |
| | | */ |
| | | |
| | | /** \def B64_VER_REVISION |
| | | * The revision version number of b64 |
| | | */ |
| | | |
| | | /** \def B64_VER |
| | | * The current composite version number of b64 |
| | | */ |
| | | |
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION |
| | | # define B64_VER_1_0_1 0x01000100 |
| | | # define B64_VER_1_0_2 0x01000200 |
| | | # define B64_VER_1_0_3 0x01000300 |
| | | # define B64_VER_1_1_1 0x01010100 |
| | | # define B64_VER_1_1_2 0x01010200 |
| | | # define B64_VER_1_1_3 0x01010300 |
| | | # define B64_VER_1_2_1 0x01020100 |
| | | # define B64_VER_1_2_2 0x01020200 |
| | | # define B64_VER_1_2_3 0x01020300 |
| | | # define B64_VER_1_2_4 0x01020400 |
| | | # define B64_VER_1_2_5 0x01020500 |
| | | # define B64_VER_1_2_6 0x01020600 |
| | | # define B64_VER_1_2_7 0x01020700 |
| | | # define B64_VER_1_3_1 0x010301ff |
| | | # define B64_VER_1_3_2 0x010302ff |
| | | # define B64_VER_1_3_3 0x010303ff |
| | | # define B64_VER_1_3_4 0x010304ff |
| | | |
| | | # define B64_VER B64_VER_1_3_4 |
| | | #else /* ? B64_DOCUMENTATION_SKIP_SECTION */ |
| | | # define B64_VER 0x010304ff |
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */ |
| | | |
| | | #define B64_VER_MAJOR 1 |
| | | #define B64_VER_MINOR 3 |
| | | #define B64_VER_REVISION 4 |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Includes |
| | | */ |
| | | |
| | | #include <stddef.h> |
| | | #include "ortp/port.h" |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Namespace |
| | | */ |
| | | |
| | | #if !defined(B64_NO_NAMESPACE) && \ |
| | | !defined(__cplusplus) |
| | | # define B64_NO_NAMESPACE |
| | | #endif /* !B64_NO_NAMESPACE && !__cplusplus */ |
| | | |
| | | #ifdef B64_NAMESPACE |
| | | # undef B64_NAMESPACE |
| | | #endif /* B64_NAMESPACE */ |
| | | |
| | | #ifdef B64_NAMESPACE_QUALIFIER |
| | | # undef B64_NAMESPACE_QUALIFIER |
| | | #endif /* B64_NAMESPACE_QUALIFIER */ |
| | | |
| | | |
| | | #ifndef B64_NO_NAMESPACE |
| | | |
| | | # ifdef B64_CUSTOM_NAMESPACE |
| | | # define B64_NAMESPACE B64_CUSTOM_NAMESPACE |
| | | # else /* ? B64_CUSTOM_NAMESPACE */ |
| | | # define B64_NAMESPACE b64 |
| | | # endif /* B64_CUSTOM_NAMESPACE */ |
| | | |
| | | # if defined(B64_CUSTOM_NAMESPACE) && \ |
| | | defined(B64_CUSTOM_NAMESPACE_QUALIFIER) |
| | | # define B64_NAMESPACE_QUALIFIER B64_CUSTOM_NAMESPACE_QUALIFIER |
| | | # else /* B64_CUSTOM_NAMESPACE && B64_CUSTOM_NAMESPACE_QUALIFIER */ |
| | | # define B64_NAMESPACE_QUALIFIER ::B64_NAMESPACE |
| | | # endif /* B64_CUSTOM_NAMESPACE && B64_CUSTOM_NAMESPACE_QUALIFIER */ |
| | | |
| | | |
| | | /** \brief [C/C++] The b64 namespace, within which the core library types and functions |
| | | * reside in C++ compilation. In C compilation, they all reside in the global |
| | | * namespace. |
| | | * |
| | | * \htmlonly |
| | | * <hr> |
| | | * \endhtmlonly |
| | | */ |
| | | namespace B64_NAMESPACE |
| | | { |
| | | #endif /* !B64_NO_NAMESPACE */ |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Enumerations |
| | | */ |
| | | |
| | | /** \brief Return codes (from b64_encode2() / b64_decode2()) |
| | | */ |
| | | enum B64_RC |
| | | { |
| | | B64_RC_OK = 0 /*!< Operation was successful. */ |
| | | , B64_RC_INSUFFICIENT_BUFFER = 1 /*!< The given translation buffer was not of sufficient size. */ |
| | | , B64_RC_TRUNCATED_INPUT = 2 /*!< The input did not represent a fully formed stream of octet couplings. */ |
| | | , B64_RC_DATA_ERROR = 3 /*!< Invalid data. */ |
| | | #ifndef B64_DOCUMENTATION_SKIP_SECTION |
| | | , B64_max_RC_value |
| | | #endif /* !B64_DOCUMENTATION_SKIP_SECTION */ |
| | | }; |
| | | |
| | | #ifndef __cplusplus |
| | | typedef enum B64_RC B64_RC; |
| | | #endif /* !__cplusplus */ |
| | | |
| | | /** \brief Coding behaviour modification flags (for b64_encode2() / b64_decode2()) |
| | | */ |
| | | enum B64_FLAGS |
| | | { |
| | | B64_F_LINE_LEN_USE_PARAM = 0x0000 /*!< Uses the lineLen parameter to b64_encode2(). Ignored by b64_decode2(). */ |
| | | , B64_F_LINE_LEN_INFINITE = 0x0001 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is infinite. Ignored by b64_decode2(). */ |
| | | , B64_F_LINE_LEN_64 = 0x0002 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is 64. Ignored by b64_decode2(). */ |
| | | , B64_F_LINE_LEN_76 = 0x0003 /*!< Ignores the lineLen parameter to b64_encode2(). Line length is 76. Ignored by b64_decode2(). */ |
| | | , B64_F_LINE_LEN_MASK = 0x000f /*!< Mask for testing line length flags to b64_encode2(). Ignored by b64_encode2(). */ |
| | | , B64_F_STOP_ON_NOTHING = 0x0000 /*!< Decoding ignores all invalid characters in the input data. Ignored by b64_encode2(). */ |
| | | , B64_F_STOP_ON_UNKNOWN_CHAR = 0x0100 /*!< Causes decoding to break if any non-Base-64 [a-zA-Z0-9=+/], non-whitespace character is encountered. Ignored by b64_encode2(). */ |
| | | , B64_F_STOP_ON_UNEXPECTED_WS = 0x0200 /*!< Causes decoding to break if any unexpected whitespace is encountered. Ignored by b64_encode2(). */ |
| | | , B64_F_STOP_ON_BAD_CHAR = 0x0300 /*!< Causes decoding to break if any non-Base-64 [a-zA-Z0-9=+/] character is encountered. Ignored by b64_encode2(). */ |
| | | }; |
| | | |
| | | #ifndef __cplusplus |
| | | typedef enum B64_FLAGS B64_FLAGS; |
| | | #endif /* !__cplusplus */ |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Functions |
| | | */ |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif /* __cplusplus */ |
| | | |
| | | /** \brief Encodes a block of binary data into Base-64 |
| | | * |
| | | * \param src Pointer to the block to be encoded. May not be NULL, except when |
| | | * \c dest is NULL, in which case it is ignored. |
| | | * \param srcSize Length of block to be encoded |
| | | * \param dest Pointer to the buffer into which the result is to be written. May |
| | | * be NULL, in which case the function returns the required length |
| | | * \param destLen Length of the buffer into which the result is to be written. Must |
| | | * be at least as large as that indicated by the return value from |
| | | * \link b64::b64_encode b64_encode(NULL, srcSize, NULL, 0)\endlink. |
| | | * |
| | | * \return 0 if the size of the buffer was insufficient, or the length of the |
| | | * converted buffer was longer than \c destLen |
| | | * |
| | | * \note The function returns the required length if \c dest is NULL |
| | | * |
| | | * \note The function returns the required length if \c dest is NULL. The returned size |
| | | * might be larger than the actual required size, but will never be smaller. |
| | | * |
| | | * \note Threading: The function is fully re-entrant. |
| | | * |
| | | * \see b64::encode() |
| | | */ |
| | | ORTP_PUBLIC size_t b64_encode(void const *src, size_t srcSize, char *dest, size_t destLen); |
| | | |
| | | /** \brief Encodes a block of binary data into Base-64 |
| | | * |
| | | * \param src Pointer to the block to be encoded. May not be NULL, except when |
| | | * \c dest is NULL, in which case it is ignored. |
| | | * \param srcSize Length of block to be encoded |
| | | * \param dest Pointer to the buffer into which the result is to be written. May |
| | | * be NULL, in which case the function returns the required length |
| | | * \param destLen Length of the buffer into which the result is to be written. Must |
| | | * be at least as large as that indicated by the return value from |
| | | * \link b64::b64_encode2 b64_encode2(NULL, srcSize, NULL, 0, flags, lineLen, rc)\endlink. |
| | | * \param flags A combination of the B64_FLAGS enumeration, that moderate the |
| | | * behaviour of the function |
| | | * \param lineLen If the flags parameter contains B64_F_LINE_LEN_USE_PARAM, then |
| | | * this parameter represents the length of the lines into which the encoded form is split, |
| | | * with a hard line break ('\\r\\n'). If this value is 0, then the line is not |
| | | * split. If it is <0, then the RFC-1113 recommended line length of 64 is used |
| | | * \param rc The return code representing the status of the operation. May be NULL. |
| | | * |
| | | * \return 0 if the size of the buffer was insufficient, or the length of the |
| | | * converted buffer was longer than \c destLen |
| | | * |
| | | * \note The function returns the required length if \c dest is NULL. The returned size |
| | | * might be larger than the actual required size, but will never be smaller. |
| | | * |
| | | * \note Threading: The function is fully re-entrant. |
| | | * |
| | | * \see b64::encode() |
| | | */ |
| | | size_t b64_encode2( void const *src |
| | | , size_t srcSize |
| | | , char *dest |
| | | , size_t destLen |
| | | , unsigned flags |
| | | , int lineLen /* = 0 */ |
| | | , B64_RC *rc /* = NULL */); |
| | | |
| | | /** \brief Decodes a sequence of Base-64 into a block of binary data |
| | | * |
| | | * \param src Pointer to the Base-64 block to be decoded. May not be NULL, except when |
| | | * \c dest is NULL, in which case it is ignored. If \c dest is NULL, and \c src is |
| | | * <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value |
| | | * is returned that is guaranteed to be large enough to hold the decoded block. |
| | | * |
| | | * \param srcLen Length of block to be encoded. Must be an integral of 4, the Base-64 |
| | | * encoding quantum, otherwise the Base-64 block is assumed to be invalid |
| | | * \param dest Pointer to the buffer into which the result is to be written. May |
| | | * be NULL, in which case the function returns the required length |
| | | * \param destSize Length of the buffer into which the result is to be written. Must |
| | | * be at least as large as that indicated by the return value from |
| | | * \c b64_decode(src, srcSize, NULL, 0), even in the case where the encoded form |
| | | * contains a number of characters that will be ignored, resulting in a lower total |
| | | * length of converted form. |
| | | * |
| | | * \return 0 if the size of the buffer was insufficient, or the length of the |
| | | * converted buffer was longer than \c destSize |
| | | * |
| | | * \note The function returns the required length if \c dest is NULL. The returned size |
| | | * might be larger than the actual required size, but will never be smaller. |
| | | * |
| | | * \note \anchor anchor__4_characters The behaviour of both |
| | | * \link b64::b64_encode2 b64_encode2()\endlink |
| | | * and |
| | | * \link b64::b64_decode2 b64_decode2()\endlink |
| | | * are undefined if the line length is not a multiple of 4. |
| | | * |
| | | * \note Threading: The function is fully re-entrant. |
| | | * |
| | | * \see b64::decode() |
| | | */ |
| | | ORTP_PUBLIC size_t b64_decode(char const *src, size_t srcLen, void *dest, size_t destSize); |
| | | |
| | | /** \brief Decodes a sequence of Base-64 into a block of binary data |
| | | * |
| | | * \param src Pointer to the Base-64 block to be decoded. May not be NULL, except when |
| | | * \c dest is NULL, in which case it is ignored. If \c dest is NULL, and \c src is |
| | | * <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value |
| | | * is returned that is guaranteed to be large enough to hold the decoded block. |
| | | * |
| | | * \param srcLen Length of block to be encoded. Must be an integral of 4, the Base-64 |
| | | * encoding quantum, otherwise the Base-64 block is assumed to be invalid |
| | | * \param dest Pointer to the buffer into which the result is to be written. May |
| | | * be NULL, in which case the function returns the required length |
| | | * \param destSize Length of the buffer into which the result is to be written. Must |
| | | * be at least as large as that indicated by the return value from |
| | | * \c b64_decode(src, srcSize, NULL, 0), even in the case where the encoded form |
| | | * contains a number of characters that will be ignored, resulting in a lower total |
| | | * length of converted form. |
| | | * \param flags A combination of the B64_FLAGS enumeration, that moderate the |
| | | * behaviour of the function. |
| | | * \param rc The return code representing the status of the operation. May be NULL. |
| | | * \param badChar If the flags parameter does not contain B64_F_STOP_ON_NOTHING, this |
| | | * parameter specifies the address of a pointer that will be set to point to any |
| | | * character in the sequence that stops the parsing, as dictated by the flags |
| | | * parameter. May be NULL. |
| | | * |
| | | * \return 0 if the size of the buffer was insufficient, or the length of the |
| | | * converted buffer was longer than \c destSize, or a bad character stopped parsing. |
| | | * |
| | | * \note The function returns the required length if \c dest is NULL. The returned size |
| | | * might be larger than the actual required size, but will never be smaller. |
| | | * |
| | | * \note The behaviour of both |
| | | * \link b64::b64_encode2 b64_encode2()\endlink |
| | | * and |
| | | * \link b64::b64_decode2 b64_decode2()\endlink |
| | | * are undefined if the line length is not a multiple of 4. |
| | | * |
| | | * \note Threading: The function is fully re-entrant. |
| | | * |
| | | * \see b64::decode() |
| | | */ |
| | | size_t b64_decode2( char const *src |
| | | , size_t srcLen |
| | | , void *dest |
| | | , size_t destSize |
| | | , unsigned flags |
| | | , char const **badChar /* = NULL */ |
| | | , B64_RC *rc /* = NULL */); |
| | | |
| | | |
| | | /** \brief Returns the textual description of the error |
| | | * |
| | | * \param code The \link b64::B64_RC error code\endlink |
| | | */ |
| | | char const *b64_getErrorString(B64_RC code); |
| | | |
| | | /** \brief Returns the length of the textual description of the error |
| | | * |
| | | * \see b64_getErrorString() |
| | | * |
| | | * \param code The \link b64::B64_RC error code\endlink |
| | | */ |
| | | size_t b64_getErrorStringLength(B64_RC code); |
| | | |
| | | |
| | | #ifdef __cplusplus |
| | | } /* extern "C" */ |
| | | #endif /* __cplusplus */ |
| | | |
| | | /* ///////////////////////////////////////////////////////////////////////////// |
| | | * Namespace |
| | | */ |
| | | |
| | | #ifndef B64_NO_NAMESPACE |
| | | } /* namespace B64_NAMESPACE */ |
| | | |
| | | # ifndef B64_DOCUMENTATION_SKIP_SECTION |
| | | |
| | | namespace stlsoft |
| | | { |
| | | |
| | | inline char const *c_str_data_a( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code); |
| | | } |
| | | inline char const *c_str_data( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code); |
| | | } |
| | | |
| | | inline size_t c_str_len_a( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorStringLength(code); |
| | | } |
| | | inline size_t c_str_len( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorStringLength(code); |
| | | } |
| | | |
| | | inline char const *c_str_ptr_a( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code); |
| | | } |
| | | inline char const *c_str_ptr( B64_NAMESPACE_QUALIFIER::B64_RC code) |
| | | { |
| | | return B64_NAMESPACE_QUALIFIER::b64_getErrorString(code); |
| | | } |
| | | |
| | | } /* namespace stlsoft */ |
| | | |
| | | # endif /* !B64_DOCUMENTATION_SKIP_SECTION */ |
| | | |
| | | #endif /* !B64_NO_NAMESPACE */ |
| | | |
| | | /* ////////////////////////////////////////////////////////////////////////// */ |
| | | |
| | | #endif /* B64_INCL_B64_H_B64 */ |
| | | |
| | | /* ////////////////////////////////////////////////////////////////////////// */ |
| | |
| | | RtpSession *session; |
| | | OrtpEvDispatcher *ev_dispatcher; |
| | | RtpTransportModifier *rtp_modifier; |
| | | RtpTransportModifier *rtcp_modifier; |
| | | queue_t sent_packets; |
| | | bctbx_mutex_t sent_packets_mutex; |
| | | int max_packets; |
| | |
| | | |
| | | ORTP_PUBLIC int close_socket(ortp_socket_t sock); |
| | | ORTP_PUBLIC int set_non_blocking_socket(ortp_socket_t sock); |
| | | ORTP_PUBLIC int set_blocking_socket(ortp_socket_t sock); |
| | | |
| | | ORTP_PUBLIC char *ortp_strndup(const char *str,int n); |
| | | #define ortp_strdup_printf bctbx_strdup_printf |
| | |
| | | RTCP_SDES_TOOL = 6, |
| | | RTCP_SDES_NOTE = 7, |
| | | RTCP_SDES_PRIV = 8, |
| | | RTCP_SDES_MID = 10, /* TODO: change this value when his identifier will be assigned */ |
| | | RTCP_SDES_MAX = 11 |
| | | RTCP_SDES_MAX = 9 |
| | | } rtcp_sdes_type_t; |
| | | |
| | | typedef struct sdes_chunk |
| | |
| | | |
| | | /* packet parsing api */ |
| | | |
| | | /*return the size of the rtcp packet*/ |
| | | ORTP_PUBLIC size_t rtcp_get_size(const mblk_t *m); |
| | | /*in case of coumpound packet, set read pointer of m to the beginning of the next RTCP |
| | | packet */ |
| | | ORTP_PUBLIC bool_t rtcp_next_packet(mblk_t *m); |
| | |
| | | uint32_t csrc[16]; |
| | | } rtp_header_t; |
| | | |
| | | /* MAX is 15 because we use 1-byte header */ |
| | | typedef enum { |
| | | RTP_EXTENSION_NONE = 0, |
| | | RTP_EXTENSION_MID = 1, |
| | | RTP_EXTENSION_MAX = 15 |
| | | } rtp_extension_type_t; |
| | | |
| | | |
| | | |
| | | typedef struct rtp_stats |
| | | { |
| | |
| | | |
| | | /* packet api */ |
| | | /* the first argument is a mblk_t. The header is supposed to be not splitted */ |
| | | #define rtp_set_markbit(mp,value) ((rtp_header_t*)((mp)->b_rptr))->markbit=(value) |
| | | #define rtp_set_extbit(mp,value) ((rtp_header_t*)((mp)->b_rptr))->extbit=(value) |
| | | #define rtp_set_markbit(mp,value) ((rtp_header_t*)((mp)->b_rptr))->markbit=(value) |
| | | #define rtp_set_seqnumber(mp,seq) ((rtp_header_t*)((mp)->b_rptr))->seq_number=(seq) |
| | | #define rtp_set_timestamp(mp,ts) ((rtp_header_t*)((mp)->b_rptr))->timestamp=(ts) |
| | | #define rtp_set_ssrc(mp,_ssrc) ((rtp_header_t*)((mp)->b_rptr))->ssrc=(_ssrc) |
| | |
| | | |
| | | ORTP_PUBLIC int rtp_get_payload(mblk_t *packet, unsigned char **start); |
| | | ORTP_PUBLIC int rtp_get_extheader(mblk_t *packet, uint16_t *profile, uint8_t **start_ext); |
| | | |
| | | /* Extension header api */ |
| | | ORTP_PUBLIC void rtp_add_extension_header(mblk_t *packet, int id, size_t size, uint8_t *data); |
| | | ORTP_PUBLIC int rtp_get_extension_header(mblk_t *packet, int id, uint8_t **data); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | struct sockaddr_storage rem_addr; |
| | | socklen_t loc_addrlen; |
| | | struct sockaddr_storage loc_addr; |
| | | socklen_t used_loc_addrlen; |
| | | struct sockaddr_storage used_loc_addr; /*Address used to redirect packets from this source*/ |
| | | struct _RtpTransport *tr; |
| | | OrtpBwEstimator recv_bw_estimator; |
| | | struct timeval send_bw_start; /* used for bandwidth estimation */ |
| | |
| | | bool_t is_spliced; |
| | | bool_t congestion_detector_enabled; |
| | | bool_t video_bandwidth_estimator_enabled; |
| | | bool_t is_primary; /* tells if this session is the primary of the rtp bundle */ |
| | | |
| | | bool_t warn_non_working_pkt_info; |
| | | |
| | | /* bundle mode */ |
| | | struct _RtpBundle *bundle; /* back pointer to the rtp bundle object */ |
| | | queue_t bundleq; |
| | | ortp_mutex_t bundleq_lock; |
| | | }; |
| | | |
| | | /** |
| | |
| | | |
| | | ORTP_PUBLIC void rtp_session_set_reuseaddr(RtpSession *session, bool_t yes); |
| | | |
| | | ORTP_PUBLIC int meta_rtp_transport_sendto(RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen); |
| | | |
| | | ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_send(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags); |
| | | ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_send_to(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags, const struct sockaddr *to, socklen_t tolen); |
| | | ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_recv(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags); |
| | |
| | | ORTP_PUBLIC void meta_rtp_transport_destroy(RtpTransport *tp); |
| | | ORTP_PUBLIC void meta_rtp_transport_append_modifier(RtpTransport *tp,RtpTransportModifier *tpm); |
| | | ORTP_PUBLIC void meta_rtp_transport_prepend_modifier(RtpTransport *tp,RtpTransportModifier *tpm); |
| | | ORTP_PUBLIC void meta_rtp_transport_remove_modifier(RtpTransport *tp, RtpTransportModifier *tpm); |
| | | |
| | | ORTP_PUBLIC int rtp_session_splice(RtpSession *session, RtpSession *to_session); |
| | | ORTP_PUBLIC int rtp_session_unsplice(RtpSession *session, RtpSession *to_session); |
| | | |
| | | ORTP_PUBLIC bool_t ortp_stream_is_ipv6(OrtpStream *os); |
| | | |
| | | /* RtpBundle api */ |
| | | typedef struct _RtpBundle RtpBundle; |
| | | |
| | | ORTP_PUBLIC RtpBundle* rtp_bundle_new(void); |
| | | ORTP_PUBLIC void rtp_bundle_delete(RtpBundle *bundle); |
| | | |
| | | ORTP_PUBLIC int rtp_bundle_get_mid_extension_id(RtpBundle *bundle); |
| | | ORTP_PUBLIC void rtp_bundle_set_mid_extension_id(RtpBundle *bundle, int id); |
| | | |
| | | ORTP_PUBLIC void rtp_bundle_add_session(RtpBundle *bundle, const char *mid, RtpSession *session); |
| | | ORTP_PUBLIC void rtp_bundle_remove_session_by_id(RtpBundle *bundle, const char *mid); |
| | | ORTP_PUBLIC void rtp_bundle_remove_session(RtpBundle *bundle, RtpSession *session); |
| | | ORTP_PUBLIC void rtp_bundle_clear(RtpBundle *bundle); |
| | | |
| | | ORTP_PUBLIC RtpSession* rtp_bundle_get_primary_session(RtpBundle *bundle); |
| | | ORTP_PUBLIC void rtp_bundle_set_primary_session(RtpBundle *bundle, const char * mid); |
| | | |
| | | ORTP_PUBLIC const char *rtp_bundle_get_session_mid(RtpBundle *bundle, RtpSession *session); |
| | | |
| | | ORTP_PUBLIC int rtp_bundle_send_through_primary(RtpBundle *bundle, bool_t is_rtp, mblk_t *m, int flags, const struct sockaddr *destaddr, socklen_t destlen); |
| | | /* Returns FALSE if the rtp packet or at least one of the RTCP packet (compound) was for the primary */ |
| | | ORTP_PUBLIC bool_t rtp_bundle_dispatch(RtpBundle *bundle, bool_t is_rtp, mblk_t *m, bool_t received_by_rtcp_mux); |
| | | ORTP_PUBLIC void rtp_session_use_local_addr(RtpSession * session, const char * rtp_local_addr, const char * rtcp_local_addr); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | |
| | | typedef struct _msgb_allocator{ |
| | | queue_t q; |
| | | int max_blocks; |
| | | }msgb_allocator_t; |
| | | |
| | | ORTP_PUBLIC void msgb_allocator_init(msgb_allocator_t *pa); |
| | | /* Set a maximum number of blocks that can be managed by the allocator. |
| | | Only blocks satisfying the "size" argument of msgb_allocator_alloc() are counted.*/ |
| | | ORTP_PUBLIC void msgb_allocator_set_max_blocks(msgb_allocator_t *pa, int max_blocks); |
| | | ORTP_PUBLIC mblk_t *msgb_allocator_alloc(msgb_allocator_t *pa, size_t size); |
| | | ORTP_PUBLIC void msgb_allocator_uninit(msgb_allocator_t *pa); |
| | | |
| | | ORTP_PUBLIC void ortp_recvaddr_to_sockaddr(ortp_recv_addr_t *recvaddr, struct sockaddr *addr, socklen_t *socklen); |
| | | ORTP_PUBLIC void ortp_sockaddr_to_recvaddr(const struct sockaddr * addr, ortp_recv_addr_t * recvaddr); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | // The form "{Major}.{Minor}.*" will automatically update the build and revision, |
| | | // and "{Major}.{Minor}.{Build}.*" will update just the revision. |
| | | |
| | | [assembly: AssemblyVersion("1.0.2")] |
| | | [assembly: AssemblyVersion("1.0.1.7")] |
| | | |
| | | // The following attributes are used to specify the signing key for the assembly, |
| | | // if desired. See the Mono documentation for more information about signing. |
| | |
| | | <ObjcBindingCoreSource Include="Structs.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <NativeReference Include="Library\libHDLLinPhoneSDK.a"> |
| | | <Kind>Static</Kind> |
| | | <Frameworks>Foundation UIKit AVFoundation CoreTelephony CallKit Photos AudioToolbox</Frameworks> |
| | | <LinkerFlags>-L/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Wl,-rpath -Wl,/usr/lib/swift -Wl,-rpath -Wl,@executable_path/Frameworks</LinkerFlags> |
| | | <WeakFrameworks></WeakFrameworks> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\bctoolbox-ios.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\bctoolbox-tester.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <BundleResource Include="Resources\ic_esvideo_on_answer.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_back.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_hangup.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_takephoto_select.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_takephoto_unselect.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_select.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_unselect.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <NativeReference Include="Library\bctoolbox.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | |
| | | <NativeReference Include="Library\belle-sip.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\limetester.framework"> |
| | | <NativeReference Include="Library\belr.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\libHDLLinPhoneSDK.a"> |
| | | <Kind>Static</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\lime.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\belr.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\linphone.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\linphonetester.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\mediastreamer2.framework"> |
| | |
| | | <NativeReference Include="Library\mscodec2.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\ortp.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\msx264.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\mswebrtc.framework"> |
| | | <NativeReference Include="Library\msopenh264.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\mssilk.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\msopenh264.framework"> |
| | | <NativeReference Include="Library\mswebrtc.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <BundleResource Include="Resources\ic_esvideo_on_answer.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_back.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_hangup.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_takephoto_select.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_takephoto_unselect.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_select.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_unselect.png" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\local_tester_hosts" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\tester_hosts" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\images\nowebcamVGA.jpg" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\images\nowebcamCIF.jpg" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\images\linphonesiteqr_captured.jpg" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\images\linphonesiteqr.jpg" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\images\linphone.svg" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\vcards\thousand_vcards.vcf" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\vcards\vcards.vcf" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\hello8000.mkv" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\hello44100.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\vrroom.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\ahbahouaismaisbon.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\hello8000.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\sintel_trailer_opus_h264.mkv" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\sintel_trailer_opus_vp8.mkv" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\oldphone.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\ringback.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\hello8000_mkv_ref.wav" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sounds\sintel_trailer_pcmu_h264.mkv" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\db\messages.db" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\db\linphone.db" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\db\friends.db" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\db\chatrooms.db" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\sip_update_within_icoming_reinvite_with_no_sdp.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\call_with_multiple_audio_mline_in_sdp.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\call_with_video_mline_before_audio_in_sdp.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\call_invite_200ok_without_contact_header.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\call_with_audio_mline_before_video_in_sdp.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\sipp\call_with_multiple_video_mline_in_sdp.xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_dependent_proxy_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_zrtp_aes256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_default_values_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_localfile_android_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\empty_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_well_known_port_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\lime_x3dh_xml_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\groupchat_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_zrtp_ecdh448_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\zero_length_params_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_zrtp_srtpsuite_aes256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_localfile2_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_localfile_win10_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\stun_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_tcp_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_dual_proxy_2_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_h264_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_lime_x3dh_no_server_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_404_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_session_timers_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_zrtp_ecdh448_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_https_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\groupchat_lime_x3dh_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_as_friend_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_localfile_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_zrtp_srtpsuite_aes256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_sips_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\laure_call_logs_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_external_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\invalid_friends_xml" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_early_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie2_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\friends_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_rc_rtcp_xr" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_rc_rtcp_xr" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_tunnel_verify_server_certificate_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\chloe_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_zrtp_b256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_tls_client_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_zrtp_b256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_dual_proxy_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\invalid_friends_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_sips_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_nat64_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_well_known_port_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_zrtp_ecdh255_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_invalid_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\remote_zero_length_params_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\chloe_lime_x3dh_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\carddav_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_transient_remote_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_lime_x3dh_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_bodyless_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_remote_invalid_uri_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_lime_x3dh_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\laure_tcp_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_wild_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\assistant_create.rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_alt_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_nat64_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\laure_rc_udp" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_quality_reporting_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\conference_focus_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_h264_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_zrtp_aes256_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\michelle_rc_udp" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\multi_account_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_v4proxy_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\account_creator_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\pauline_v4proxy_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\marie_zrtp_ecdh255_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\rcfiles\laure_lime_x3dh_rc" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\altname\agent.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\altname\openssl-altname.cnf" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\altname\cafile.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\cn\openssl-cn.cnf" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\cn\agent.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\cn\cafile.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\cert2-signed-by-other-ca.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\cert3.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\cert2.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\key.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\key3.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\key2.pem" /> |
| | | <BundleResource Include="Resources\liblinphone_tester\certificates\client\cert.pem" /> |
| | | <NativeReference Include="Library\msx264.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\ortp.framework"> |
| | | <Kind>Framework</Kind> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\bctoolbox-ios.framework"> |
| | | <Kind>Framework</Kind> |
| | | <SmartLink>False</SmartLink> |
| | | </NativeReference> |
| | | <NativeReference Include="Library\bctoolbox-tester.framework"> |
| | | <Kind>Framework</Kind> |
| | | <SmartLink>False</SmartLink> |
| | | </NativeReference> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> |
| | | </Project> |