mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1307 lines
50 KiB
C
1307 lines
50 KiB
C
/*
|
|
*
|
|
* Copyright 2019-2021 Signal Messenger, LLC
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*
|
|
*/
|
|
|
|
#ifndef CBINDGEN_BINDINGS_H
|
|
#define CBINDGEN_BINDINGS_H
|
|
|
|
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
|
|
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#define MINIMUM_BITRATE_BPS 30000
|
|
|
|
#define MAXIMUM_BITRATE_BPS 2000001
|
|
|
|
#define MAX_MESSAGE_AGE_SEC 120
|
|
|
|
/**
|
|
* The periodic tick interval. Used to generate stats and to retransmit data channel messages.
|
|
*/
|
|
#define TICK_PERIOD_SEC 1
|
|
|
|
/**
|
|
* The stats period, how often to get and log them. Assumes tick period is 1 second.
|
|
*/
|
|
#define STATS_PERIOD_SEC 10
|
|
|
|
#define MAC_SIZE_BYTES 16
|
|
|
|
typedef enum LogSeverity {
|
|
Verbose,
|
|
Info,
|
|
Warn,
|
|
Error,
|
|
None,
|
|
} LogSeverity;
|
|
|
|
/**
|
|
* Rust version of WebRTC AdapterType
|
|
*/
|
|
typedef enum NetworkInterfaceType {
|
|
Unknown = 0,
|
|
Ethernet = 1,
|
|
Wifi = (1 << 1),
|
|
Cellular = (1 << 2),
|
|
Vpn = (1 << 3),
|
|
Loopback = (1 << 4),
|
|
Any = (1 << 5),
|
|
} NetworkInterfaceType;
|
|
|
|
typedef enum RffiVideoCodecType {
|
|
Vp8 = 8,
|
|
H264ConstrainedHigh = 46,
|
|
H264ConstrainedBaseline = 40,
|
|
} RffiVideoCodecType;
|
|
|
|
typedef enum SrtpCryptoSuite {
|
|
Aes128CmSha1 = 1,
|
|
AeadAes128Gcm = 7,
|
|
AeadAes256Gcm = 8,
|
|
} SrtpCryptoSuite;
|
|
|
|
typedef enum VideoRotation {
|
|
VideoRotation_None = 0,
|
|
VideoRotation_Clockwise90 = 90,
|
|
VideoRotation_Clockwise180 = 180,
|
|
VideoRotation_Clockwise270 = 270,
|
|
} VideoRotation;
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
/**
|
|
* Incomplete type for C++ JavaMediaStream.
|
|
*/
|
|
typedef struct RffiJavaMediaStream {
|
|
uint8_t _private[0];
|
|
} RffiJavaMediaStream;
|
|
#endif
|
|
|
|
/**
|
|
* Incomplete type for WebRTC C++ MediaStream.
|
|
*/
|
|
typedef struct RffiMediaStream {
|
|
uint8_t _private[0];
|
|
} RffiMediaStream;
|
|
|
|
/**
|
|
* Incomplete type for C++ PeerConnection.
|
|
*/
|
|
typedef struct RffiPeerConnection {
|
|
uint8_t _private[0];
|
|
} RffiPeerConnection;
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing buffers (strings/bytes) to/from Swift.
|
|
*/
|
|
typedef struct AppByteSlice {
|
|
const uint8_t *bytes;
|
|
size_t len;
|
|
} AppByteSlice;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Log object for interfacing with swift.
|
|
*/
|
|
typedef struct IosLogger {
|
|
void *object;
|
|
void (*destroy)(void *object);
|
|
void (*log)(void *object, struct AppByteSlice message, struct AppByteSlice file, struct AppByteSlice function, int32_t line, int8_t level);
|
|
} IosLogger;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing multiple Ice Candidates to/from Swift.
|
|
*/
|
|
typedef struct AppIceCandidateArray {
|
|
const struct AppByteSlice *candidates;
|
|
size_t count;
|
|
} AppIceCandidateArray;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing name/value strings to/from Swift.
|
|
*/
|
|
typedef struct AppHeader {
|
|
struct AppByteSlice name;
|
|
struct AppByteSlice value;
|
|
} AppHeader;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing multiple name/value headers to/from Swift.
|
|
*/
|
|
typedef struct AppHeaderArray {
|
|
const struct AppHeader *headers;
|
|
size_t count;
|
|
} AppHeaderArray;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing connection details from the application.
|
|
*/
|
|
typedef struct AppConnectionInterface {
|
|
void *object;
|
|
void *pc;
|
|
/**
|
|
* Swift object clean up method.
|
|
*/
|
|
void (*destroy)(void *object);
|
|
} AppConnectionInterface;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing media stream instances from the application.
|
|
*/
|
|
typedef struct AppMediaStreamInterface {
|
|
void *object;
|
|
/**
|
|
* Swift object clean up method.
|
|
*/
|
|
void (*destroy)(void *object);
|
|
/**
|
|
* Returns a pointer to a RTCMediaStream object.
|
|
*/
|
|
void *(*createMediaStream)(void *object, void *nativeStream);
|
|
} AppMediaStreamInterface;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppUuidArray {
|
|
const struct AppByteSlice *uuids;
|
|
size_t count;
|
|
} AppUuidArray;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing optional u32 values to/from Swift.
|
|
*/
|
|
typedef struct AppOptionalUInt32 {
|
|
uint32_t value;
|
|
bool valid;
|
|
} AppOptionalUInt32;
|
|
#endif
|
|
|
|
typedef uint32_t ClientId;
|
|
|
|
typedef uint32_t DemuxId;
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing optional bool values to/from Swift.
|
|
*/
|
|
typedef struct AppOptionalBool {
|
|
bool value;
|
|
bool valid;
|
|
} AppOptionalBool;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppRemoteDeviceState {
|
|
DemuxId demuxId;
|
|
struct AppByteSlice user_id;
|
|
bool mediaKeysReceived;
|
|
struct AppOptionalBool audioMuted;
|
|
struct AppOptionalBool videoMuted;
|
|
struct AppOptionalBool presenting;
|
|
struct AppOptionalBool sharingScreen;
|
|
uint64_t addedTime;
|
|
uint64_t speakerTime;
|
|
} AppRemoteDeviceState;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppRemoteDeviceStateArray {
|
|
const struct AppRemoteDeviceState *states;
|
|
size_t count;
|
|
} AppRemoteDeviceStateArray;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* iOS Interface for communicating with the Swift application.
|
|
*/
|
|
typedef struct AppInterface {
|
|
/**
|
|
* Raw Swift object pointer.
|
|
*/
|
|
void *object;
|
|
/**
|
|
* Swift object clean up method.
|
|
*/
|
|
void (*destroy)(void *object);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onStartCall)(void *object, const void *remote, uint64_t callId, bool isOutgoing, int32_t callMediaType);
|
|
/**
|
|
* Swift event callback method.
|
|
*/
|
|
void (*onEvent)(void *object, const void *remote, int32_t event);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onSendOffer)(void *object, uint64_t callId, const void *remote, uint32_t destinationDeviceId, bool broadcast, struct AppByteSlice opaque, int32_t callMediaType);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onSendAnswer)(void *object, uint64_t callId, const void *remote, uint32_t destinationDeviceId, bool broadcast, struct AppByteSlice opaque);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onSendIceCandidates)(void *object, uint64_t callId, const void *remote, uint32_t destinationDeviceId, bool broadcast, const struct AppIceCandidateArray *candidates);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onSendHangup)(void *object, uint64_t callId, const void *remote, uint32_t destinationDeviceId, bool broadcast, int32_t hangupType, uint32_t deviceId, bool useLegacyHangupMessage);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onSendBusy)(void *object, uint64_t callId, const void *remote, uint32_t destinationDeviceId, bool broadcast);
|
|
/**
|
|
*
|
|
*/
|
|
void (*sendCallMessage)(void *object, struct AppByteSlice recipientUuid, struct AppByteSlice message);
|
|
/**
|
|
*
|
|
*/
|
|
void (*sendHttpRequest)(void *object, uint32_t requestId, struct AppByteSlice url, int32_t method, struct AppHeaderArray headerArray, struct AppByteSlice body);
|
|
/**
|
|
*
|
|
*/
|
|
struct AppConnectionInterface (*onCreateConnectionInterface)(void *object, void *observer, uint32_t deviceId, void *context, bool enable_dtls, bool enable_rtp_data_channel);
|
|
/**
|
|
* Request that the application create an application Media Stream object
|
|
* associated with the given application Connection object.
|
|
*/
|
|
struct AppMediaStreamInterface (*onCreateMediaStreamInterface)(void *object, void *connection);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onConnectMedia)(void *object, const void *remote, void *context, const void *stream);
|
|
/**
|
|
*
|
|
*/
|
|
bool (*onCompareRemotes)(void *object, const void *remote1, const void *remote2);
|
|
/**
|
|
*
|
|
*/
|
|
void (*onCallConcluded)(void *object, const void *remote);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handlePeekResponse)(void *object, uint32_t requestId, struct AppUuidArray joinedMembers, struct AppByteSlice creator, struct AppByteSlice eraId, struct AppOptionalUInt32 maxDevices, uint32_t deviceCount);
|
|
/**
|
|
*
|
|
*/
|
|
void (*requestMembershipProof)(void *object, ClientId clientId);
|
|
/**
|
|
*
|
|
*/
|
|
void (*requestGroupMembers)(void *object, ClientId clientId);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handleConnectionStateChanged)(void *object, ClientId clientId, int32_t connectionState);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handleJoinStateChanged)(void *object, ClientId clientId, int32_t joinState);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handleRemoteDevicesChanged)(void *object, ClientId clientId, struct AppRemoteDeviceStateArray remoteDeviceStates);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handleIncomingVideoTrack)(void *object, ClientId clientId, DemuxId remoteDemuxId, void *nativeVideoTrack);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handlePeekChanged)(void *object, ClientId clientId, struct AppUuidArray joinedMembers, struct AppByteSlice creator, struct AppByteSlice eraId, struct AppOptionalUInt32 maxDevices, uint32_t deviceCount);
|
|
/**
|
|
*
|
|
*/
|
|
void (*handleEnded)(void *object, ClientId clientId, int32_t reason);
|
|
} AppInterface;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for holding call context details on behalf of the application.
|
|
*/
|
|
typedef struct AppCallContext {
|
|
void *object;
|
|
/**
|
|
* Swift object clean up method.
|
|
*/
|
|
void (*destroy)(void *object);
|
|
} AppCallContext;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppGroupMemberInfo {
|
|
struct AppByteSlice userId;
|
|
struct AppByteSlice userIdCipherText;
|
|
} AppGroupMemberInfo;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppGroupMemberInfoArray {
|
|
const struct AppGroupMemberInfo *members;
|
|
size_t count;
|
|
} AppGroupMemberInfoArray;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
/**
|
|
* Structure for passing optional u16 values to/from Swift.
|
|
*/
|
|
typedef struct AppOptionalUInt16 {
|
|
uint16_t value;
|
|
bool valid;
|
|
} AppOptionalUInt16;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppVideoRequest {
|
|
DemuxId demux_id;
|
|
uint16_t width;
|
|
uint16_t height;
|
|
struct AppOptionalUInt16 framerate;
|
|
} AppVideoRequest;
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
typedef struct AppVideoRequestArray {
|
|
const struct AppVideoRequest *resolutions;
|
|
size_t count;
|
|
} AppVideoRequestArray;
|
|
#endif
|
|
|
|
/**
|
|
* Rust version of WebRTC RFFI InjectableNetwork
|
|
*/
|
|
typedef struct RffiInjectableNetwork {
|
|
uint8_t _private[0];
|
|
} RffiInjectableNetwork;
|
|
|
|
/**
|
|
* Opaque pointer type for an object of C++ origin.
|
|
*/
|
|
typedef const void *CppObject;
|
|
|
|
/**
|
|
* Rust version of Web RFFI Ip,
|
|
* which is like WebRTC IPAddress.
|
|
*/
|
|
typedef struct RffiIp {
|
|
bool v6;
|
|
uint8_t address[16];
|
|
} RffiIp;
|
|
|
|
/**
|
|
* Rust version of WebRTC RFFI IpPort,
|
|
* which is like WebRTC SocketAddress
|
|
*/
|
|
typedef struct RffiIpPort {
|
|
struct RffiIp ip;
|
|
uint16_t port;
|
|
} RffiIpPort;
|
|
|
|
/**
|
|
* Incomplete type for C++ DataChannelInterface.
|
|
*/
|
|
typedef struct RffiDataChannel {
|
|
uint8_t _private[0];
|
|
} RffiDataChannel;
|
|
|
|
/**
|
|
* Incomplete type for C++ VideoTrack.
|
|
*/
|
|
typedef struct RffiVideoTrack {
|
|
uint8_t _private[0];
|
|
} RffiVideoTrack;
|
|
|
|
/**
|
|
* Incomplete type for C++ AudioTrack.
|
|
*/
|
|
typedef struct RffiAudioTrack {
|
|
uint8_t _private[0];
|
|
} RffiAudioTrack;
|
|
|
|
/**
|
|
* Opaque pointer type for an object of Rust origin.
|
|
*/
|
|
typedef const void *RustObject;
|
|
|
|
/**
|
|
* Incomplete type for C++ VideoSource.
|
|
*/
|
|
typedef struct RffiVideoSource {
|
|
uint8_t _private[0];
|
|
} RffiVideoSource;
|
|
|
|
/**
|
|
* Incomplete type for C++ webrtc::VideoFrameBuffer.
|
|
*/
|
|
typedef struct RffiVideoFrameBuffer {
|
|
uint8_t _private[0];
|
|
} RffiVideoFrameBuffer;
|
|
|
|
/**
|
|
* Incomplete type for C++ webrtc::rffi::CreateSessionDescriptionObserverRffi
|
|
*/
|
|
typedef struct RffiCreateSessionDescriptionObserver {
|
|
uint8_t _private[0];
|
|
} RffiCreateSessionDescriptionObserver;
|
|
|
|
/**
|
|
* Incomplete type for C++ CreateSessionDescriptionObserverRffi
|
|
*/
|
|
typedef struct RffiSetSessionDescriptionObserver {
|
|
uint8_t _private[0];
|
|
} RffiSetSessionDescriptionObserver;
|
|
|
|
/**
|
|
* Incomplete type for SessionDescription, used by
|
|
* CreateSessionDescriptionObserver callbacks.
|
|
*/
|
|
typedef struct RffiSessionDescription {
|
|
uint8_t _private[0];
|
|
} RffiSessionDescription;
|
|
|
|
/**
|
|
* Incomplete type for C++ PeerConnectionObserver.
|
|
*/
|
|
typedef struct RffiPeerConnectionObserver {
|
|
uint8_t _private[0];
|
|
} RffiPeerConnectionObserver;
|
|
|
|
/**
|
|
* Incomplete type for C++ IceGathererInterface.
|
|
*/
|
|
typedef struct RffiIceGatherer {
|
|
uint8_t _private[0];
|
|
} RffiIceGatherer;
|
|
|
|
/**
|
|
* Incomplete type for C++ webrtc::rffi::StatsObserverRffi
|
|
*/
|
|
typedef struct RffiStatsObserver {
|
|
uint8_t _private[0];
|
|
} RffiStatsObserver;
|
|
|
|
typedef uint8_t PayloadType;
|
|
|
|
typedef uint16_t SequenceNumber;
|
|
|
|
typedef uint32_t Timestamp;
|
|
|
|
typedef uint32_t Ssrc;
|
|
|
|
typedef struct RffiAudioEncoderConfig {
|
|
uint32_t packet_size_ms;
|
|
int32_t bandwidth;
|
|
int32_t start_bitrate_bps;
|
|
int32_t min_bitrate_bps;
|
|
int32_t max_bitrate_bps;
|
|
int32_t complexity;
|
|
int32_t enable_vbr;
|
|
int32_t enable_dtx;
|
|
int32_t enable_fec;
|
|
} RffiAudioEncoderConfig;
|
|
|
|
/**
|
|
* Incomplete type for C++ PeerConnectionFactory.
|
|
*/
|
|
typedef struct RffiPeerConnectionFactory {
|
|
uint8_t _private[0];
|
|
} RffiPeerConnectionFactory;
|
|
|
|
/**
|
|
* Incomplete type for C++ RTCCertificate.
|
|
*/
|
|
typedef struct RffiCertificate {
|
|
uint8_t _private[0];
|
|
} RffiCertificate;
|
|
|
|
typedef struct RffiIceServer {
|
|
const char *username;
|
|
const char *password;
|
|
const char *const *urls;
|
|
uintptr_t urls_size;
|
|
} RffiIceServer;
|
|
|
|
typedef struct RffiVideoCodec {
|
|
enum RffiVideoCodecType type;
|
|
uint32_t level;
|
|
} RffiVideoCodec;
|
|
|
|
typedef struct RffiConnectionParametersV4 {
|
|
const char *ice_ufrag;
|
|
const char *ice_pwd;
|
|
const struct RffiVideoCodec *receive_video_codecs;
|
|
uintptr_t receive_video_codecs_size;
|
|
} RffiConnectionParametersV4;
|
|
|
|
#define INVALID_CLIENT_ID 0
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jobject Java_org_signal_ringrtc_CallManager_ringrtcGetBuildInfo(JNIEnv env, JClass _class);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcInitialize(JNIEnv env, JClass _class);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jlong Java_org_signal_ringrtc_CallManager_ringrtcCreateCallManager(JNIEnv env,
|
|
JClass _class,
|
|
JObject jni_call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jlong Java_org_signal_ringrtc_CallManager_ringrtcCreatePeerConnection(JNIEnv env,
|
|
JObject _object,
|
|
jlong peer_connection_factory,
|
|
jlong native_connection,
|
|
JObject jni_rtc_config,
|
|
JObject jni_media_constraints,
|
|
bool enable_dtls,
|
|
bool enable_rtp_data_channel);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcCall(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
JObject jni_remote,
|
|
jint call_media_type,
|
|
jint local_device);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcProceed(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
JObject jni_call_context,
|
|
jint bandwidth_mode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcMessageSent(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcMessageSendFailure(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcHangup(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedAnswer(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
jint remote_device,
|
|
jbyteArray opaque,
|
|
jboolean remote_supports_multi_ring,
|
|
jbyteArray sender_identity_key,
|
|
jbyteArray receiver_identity_key);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedOffer(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
JObject jni_remote,
|
|
jint remote_device,
|
|
jbyteArray opaque,
|
|
jlong message_age_sec,
|
|
jint call_media_type,
|
|
jint local_device,
|
|
jboolean remote_supports_multi_ring,
|
|
jboolean jni_is_local_device_primary,
|
|
jbyteArray sender_identity_key,
|
|
jbyteArray receiver_identity_key);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedIceCandidates(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
jint remote_device,
|
|
JObject jni_ice_candidates);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedHangup(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
jint remote_device,
|
|
jint hangup_type,
|
|
jint device_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedBusy(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id,
|
|
jint remote_device);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedCallMessage(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jbyteArray sender_uuid,
|
|
jint sender_device_id,
|
|
jint local_device_id,
|
|
jbyteArray message,
|
|
jlong message_age_sec);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReceivedHttpResponse(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong request_id,
|
|
jint status_code,
|
|
jbyteArray body);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcHttpRequestFailed(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong request_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcAcceptCall(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jobject Java_org_signal_ringrtc_CallManager_ringrtcGetActiveConnection(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jobject Java_org_signal_ringrtc_CallManager_ringrtcGetActiveCallContext(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcSetVideoEnable(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jboolean enable);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcUpdateBandwidthMode(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jint bandwidth_mode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcDrop(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong call_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcReset(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcClose(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_CallManager_ringrtcPeekGroupCall(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong request_id,
|
|
JString sfu_url,
|
|
jbyteArray membership_proof,
|
|
jbyteArray jni_serialized_group_members);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
jlong Java_org_signal_ringrtc_GroupCall_ringrtcCreateGroupCallClient(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jbyteArray group_id,
|
|
JString sfu_url,
|
|
jlong native_audio_track,
|
|
jlong native_video_track);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcDeleteGroupCallClient(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcConnect(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcJoin(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcLeave(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcDisconnect(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcSetOutgoingAudioMuted(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
bool muted);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcSetOutgoingVideoMuted(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
bool muted);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcResendMediaKeys(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcSetBandwidthMode(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
jint bandwidth_mode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcRequestVideo(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
JObject jni_rendered_resolutions);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcSetGroupMembers(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
jbyteArray jni_serialized_group_members);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
void Java_org_signal_ringrtc_GroupCall_ringrtcSetMembershipProof(JNIEnv env,
|
|
JObject _object,
|
|
jlong call_manager,
|
|
jlong client_id,
|
|
jbyteArray proof);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
extern const struct RffiJavaMediaStream *Rust_createJavaMediaStream(const struct RffiMediaStream *rffi_media_stream);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
extern void Rust_freeJavaMediaStream(const struct RffiJavaMediaStream *rffi_java_media_stream);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
extern jobject Rust_getJavaMediaStreamObject(const struct RffiJavaMediaStream *rffi_java_media_stream);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
/**
|
|
* Export the nativeCreatepeerconnection() call from the
|
|
* org.webrtc.PeerConnectionFactory class.
|
|
*/
|
|
extern jlong Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnection(JNIEnv env,
|
|
JClass class_,
|
|
jlong factory,
|
|
JObject rtcConfig,
|
|
JObject constraints,
|
|
jlong nativeObserver,
|
|
JObject sslCertificateVerifier,
|
|
jboolean enable_dtls,
|
|
jboolean enable_rtp_data_channel);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_ANDROID)
|
|
extern const struct RffiPeerConnection *Rust_getPeerConnectionFromJniOwnedPeerConnection(int64_t jni_owned_pc);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcInitialize(struct IosLogger logObject);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcCreate(void *appCallManager, struct AppInterface appInterface);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcCall(void *callManager,
|
|
const void *appRemote,
|
|
int32_t callMediaType,
|
|
uint32_t appLocalDevice);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcProceed(void *callManager,
|
|
uint64_t callId,
|
|
struct AppCallContext appCallContext,
|
|
int32_t bandwidthMode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcMessageSent(void *callManager, uint64_t callId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcMessageSendFailure(void *callManager, uint64_t callId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcHangup(void *callManager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReceivedAnswer(void *callManager,
|
|
uint64_t callId,
|
|
uint32_t senderDeviceId,
|
|
struct AppByteSlice opaque,
|
|
bool senderSupportsMultiRing,
|
|
struct AppByteSlice senderIdentityKey,
|
|
struct AppByteSlice receiverIdentityKey);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReceivedOffer(void *callManager,
|
|
uint64_t callId,
|
|
const void *remotePeer,
|
|
uint32_t senderDeviceId,
|
|
struct AppByteSlice opaque,
|
|
uint64_t messageAgeSec,
|
|
int32_t callMediaType,
|
|
uint32_t receiverDeviceId,
|
|
bool senderSupportsMultiRing,
|
|
bool receiverDeviceIsPrimary,
|
|
struct AppByteSlice senderIdentityKey,
|
|
struct AppByteSlice receiverIdentityKey);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReceivedIceCandidates(void *callManager,
|
|
uint64_t callId,
|
|
uint32_t senderDeviceId,
|
|
const struct AppIceCandidateArray *appIceCandidateArray);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReceivedHangup(void *callManager,
|
|
uint64_t callId,
|
|
uint32_t remoteDevice,
|
|
int32_t hangupType,
|
|
uint32_t deviceId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReceivedBusy(void *callManager, uint64_t callId, uint32_t remoteDevice);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcReceivedCallMessage(void *callManager,
|
|
struct AppByteSlice senderUuid,
|
|
uint32_t senderDeviceId,
|
|
uint32_t localDeviceId,
|
|
struct AppByteSlice message,
|
|
uint64_t messageAgeSec);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcReceivedHttpResponse(void *callManager,
|
|
uint32_t requestId,
|
|
uint16_t statusCode,
|
|
struct AppByteSlice body);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcHttpRequestFailed(void *callManager, uint32_t requestId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcAccept(void *callManager, uint64_t callId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcGetActiveConnection(void *callManager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcGetActiveCallContext(void *callManager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcSetVideoEnable(void *callManager, bool enable);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcUpdateBandwidthMode(void *callManager, int32_t bandwidthMode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcDrop(void *callManager, uint64_t callId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcReset(void *callManager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void *ringrtcClose(void *callManager);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcPeekGroupCall(void *callManager,
|
|
uint32_t requestId,
|
|
struct AppByteSlice sfuUrl,
|
|
struct AppByteSlice proof,
|
|
const struct AppGroupMemberInfoArray *appGroupMemberInfoArray);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
ClientId ringrtcCreateGroupCallClient(void *callManager,
|
|
struct AppByteSlice groupId,
|
|
struct AppByteSlice sfuUrl,
|
|
const void *nativeAudioTrack,
|
|
const void *nativeVideoTrack);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcDeleteGroupCallClient(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcConnect(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcJoin(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcLeave(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcDisconnect(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcSetOutgoingAudioMuted(void *callManager, ClientId clientId, bool muted);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcSetOutgoingVideoMuted(void *callManager, ClientId clientId, bool muted);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcResendMediaKeys(void *callManager, ClientId clientId);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcSetBandwidthMode(void *callManager, ClientId clientId, int32_t bandwidthMode);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcRequestVideo(void *callManager,
|
|
ClientId clientId,
|
|
const struct AppVideoRequestArray *appVideoRequestArray);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcSetGroupMembers(void *callManager,
|
|
ClientId clientId,
|
|
const struct AppGroupMemberInfoArray *appGroupMemberInfoArray);
|
|
#endif
|
|
|
|
#if defined(TARGET_OS_IOS)
|
|
void ringrtcSetMembershipProof(void *callManager, ClientId clientId, struct AppByteSlice proof);
|
|
#endif
|
|
|
|
extern void Rust_InjectableNetwork_SetSender(const struct RffiInjectableNetwork *network,
|
|
CppObject sender);
|
|
|
|
extern void Rust_InjectableNetwork_AddInterface(const struct RffiInjectableNetwork *network,
|
|
const char *name,
|
|
enum NetworkInterfaceType typ,
|
|
struct RffiIp ip,
|
|
uint16_t preference);
|
|
|
|
extern void Rust_InjectableNetwork_RemoveInterface(const struct RffiInjectableNetwork *network,
|
|
const char *name);
|
|
|
|
extern void Rust_InjectableNetwork_ReceiveUdp(const struct RffiInjectableNetwork *network,
|
|
struct RffiIpPort source,
|
|
struct RffiIpPort dest,
|
|
const uint8_t *data,
|
|
uintptr_t size);
|
|
|
|
extern bool Rust_dataChannelSend(const struct RffiDataChannel *data_channel,
|
|
const uint8_t *buffer,
|
|
size_t len,
|
|
bool binary);
|
|
|
|
extern void Rust_setLogger(CppObject cbs, enum LogSeverity min_severity);
|
|
|
|
extern uint32_t Rust_getTrackIdAsUint32(const struct RffiVideoTrack *track);
|
|
|
|
extern void Rust_setAudioTrackEnabled(const struct RffiAudioTrack *track, bool enabled);
|
|
|
|
extern void Rust_setVideoTrackEnabled(const struct RffiVideoTrack *track, bool enabled);
|
|
|
|
extern void Rust_setVideoTrackContentHint(const struct RffiVideoTrack *track, bool is_screenshare);
|
|
|
|
extern const struct RffiVideoTrack *Rust_getFirstVideoTrack(const struct RffiMediaStream *stream);
|
|
|
|
extern void Rust_addVideoSink(const struct RffiVideoTrack *track, RustObject obj, CppObject cb);
|
|
|
|
extern void Rust_pushVideoFrame(const struct RffiVideoSource *source,
|
|
const struct RffiVideoFrameBuffer *buffer);
|
|
|
|
extern const struct RffiVideoFrameBuffer *Rust_createVideoFrameBufferFromRgba(uint32_t width,
|
|
uint32_t height,
|
|
const uint8_t *rgba_buffer);
|
|
|
|
extern void Rust_convertVideoFrameBufferToRgba(const struct RffiVideoFrameBuffer *buffer,
|
|
uint8_t *rgba_buffer);
|
|
|
|
extern const struct RffiVideoFrameBuffer *Rust_copyAndRotateVideoFrameBuffer(const struct RffiVideoFrameBuffer *buffer,
|
|
enum VideoRotation rotation);
|
|
|
|
extern void Rust_createOffer(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiCreateSessionDescriptionObserver *csd_observer);
|
|
|
|
extern void Rust_setLocalDescription(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiSetSessionDescriptionObserver *ssd_observer,
|
|
const struct RffiSessionDescription *local_description);
|
|
|
|
extern void Rust_createAnswer(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiCreateSessionDescriptionObserver *csd_observer);
|
|
|
|
extern void Rust_setRemoteDescription(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiSetSessionDescriptionObserver *ssd_observer,
|
|
const struct RffiSessionDescription *remote_description);
|
|
|
|
extern void Rust_setOutgoingMediaEnabled(const struct RffiPeerConnection *peer_connection,
|
|
bool enabled);
|
|
|
|
extern bool Rust_setIncomingMediaEnabled(const struct RffiPeerConnection *peer_connection,
|
|
bool enabled);
|
|
|
|
extern const struct RffiDataChannel *Rust_createSignalingDataChannel(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiPeerConnectionObserver *pc_observer);
|
|
|
|
extern bool Rust_addIceCandidateFromSdp(const struct RffiPeerConnection *peer_connection,
|
|
const char *sdp);
|
|
|
|
extern bool Rust_addIceCandidateFromServer(const struct RffiPeerConnection *peer_connection,
|
|
struct RffiIp ip,
|
|
uint16_t port,
|
|
bool tcp);
|
|
|
|
extern const struct RffiIceGatherer *Rust_createSharedIceGatherer(const struct RffiPeerConnection *peer_connection);
|
|
|
|
extern bool Rust_useSharedIceGatherer(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiIceGatherer *ice_gatherer);
|
|
|
|
extern void Rust_getStats(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiStatsObserver *stats_observer);
|
|
|
|
extern void Rust_setSendBitrates(const struct RffiPeerConnection *peer_connection,
|
|
int32_t min_bitrate_bps,
|
|
int32_t start_bitrate_bps,
|
|
int32_t max_bitrate_bps);
|
|
|
|
extern bool Rust_sendRtp(const struct RffiPeerConnection *peer_connection,
|
|
PayloadType pt,
|
|
SequenceNumber seqnum,
|
|
Timestamp timestamp,
|
|
Ssrc ssrc,
|
|
const uint8_t *payload_data,
|
|
uintptr_t payload_size);
|
|
|
|
extern bool Rust_receiveRtp(const struct RffiPeerConnection *peer_connection, PayloadType pt);
|
|
|
|
extern void Rust_configureAudioEncoders(const struct RffiPeerConnection *peer_connection,
|
|
const struct RffiAudioEncoderConfig *config);
|
|
|
|
extern void Rust_closePeerConnection(const struct RffiPeerConnection *peer_connection);
|
|
|
|
extern const struct RffiPeerConnectionFactory *Rust_createPeerConnectionFactory(bool use_injectable_network);
|
|
|
|
extern const struct RffiInjectableNetwork *Rust_getInjectableNetwork(const struct RffiPeerConnectionFactory *factory);
|
|
|
|
extern const struct RffiPeerConnection *Rust_createPeerConnection(const struct RffiPeerConnectionFactory *factory,
|
|
const struct RffiPeerConnectionObserver *observer,
|
|
const struct RffiCertificate *certificate,
|
|
bool hide_ip,
|
|
struct RffiIceServer ice_server,
|
|
const struct RffiAudioTrack *outgoing_audio_track,
|
|
const struct RffiVideoTrack *outgoing_video_track,
|
|
bool enable_dtls,
|
|
bool enable_rtp_data_channel);
|
|
|
|
extern const struct RffiAudioTrack *Rust_createAudioTrack(const struct RffiPeerConnectionFactory *factory);
|
|
|
|
extern const struct RffiVideoSource *Rust_createVideoSource(const struct RffiPeerConnectionFactory *factory);
|
|
|
|
extern const struct RffiVideoTrack *Rust_createVideoTrack(const struct RffiPeerConnectionFactory *factory,
|
|
const struct RffiVideoSource *source);
|
|
|
|
extern const struct RffiCertificate *Rust_generateCertificate(void);
|
|
|
|
extern bool Rust_computeCertificateFingerprintSha256(const struct RffiCertificate *cert,
|
|
uint8_t (*fingerprint)[32]);
|
|
|
|
extern int16_t Rust_getAudioPlayoutDevices(const struct RffiPeerConnectionFactory *factory);
|
|
|
|
extern int32_t Rust_getAudioPlayoutDeviceName(const struct RffiPeerConnectionFactory *factory,
|
|
uint16_t index,
|
|
char *out_name,
|
|
char *out_uuid);
|
|
|
|
extern bool Rust_setAudioPlayoutDevice(const struct RffiPeerConnectionFactory *factory,
|
|
uint16_t index);
|
|
|
|
extern int16_t Rust_getAudioRecordingDevices(const struct RffiPeerConnectionFactory *factory);
|
|
|
|
extern int32_t Rust_getAudioRecordingDeviceName(const struct RffiPeerConnectionFactory *factory,
|
|
uint16_t index,
|
|
char *out_name,
|
|
char *out_uuid);
|
|
|
|
extern bool Rust_setAudioRecordingDevice(const struct RffiPeerConnectionFactory *factory,
|
|
uint16_t index);
|
|
|
|
extern const struct RffiPeerConnectionObserver *Rust_createPeerConnectionObserver(RustObject cc_ptr,
|
|
CppObject pc_observer_cb,
|
|
bool enable_frame_encryption);
|
|
|
|
extern void Rust_addRef(CppObject ref_counted_pointer);
|
|
|
|
extern void Rust_releaseRef(CppObject ref_counted_pointer);
|
|
|
|
extern const struct RffiSetSessionDescriptionObserver *Rust_createSetSessionDescriptionObserver(RustObject ssd_observer,
|
|
const void *ssd_observer_cb);
|
|
|
|
extern const struct RffiCreateSessionDescriptionObserver *Rust_createCreateSessionDescriptionObserver(RustObject csd_observer,
|
|
const void *csd_observer_cb);
|
|
|
|
extern const char *Rust_toSdp(const struct RffiSessionDescription *offer);
|
|
|
|
extern struct RffiSessionDescription *Rust_answerFromSdp(const char *sdp);
|
|
|
|
extern struct RffiSessionDescription *Rust_offerFromSdp(const char *sdp);
|
|
|
|
extern bool Rust_disableDtlsAndSetSrtpKey(struct RffiSessionDescription *session_description,
|
|
enum SrtpCryptoSuite crypto_suite,
|
|
const uint8_t *key_ptr,
|
|
size_t key_len,
|
|
const uint8_t *salt_ptr,
|
|
size_t salt_len);
|
|
|
|
extern struct RffiConnectionParametersV4 *Rust_sessionDescriptionToV4(const struct RffiSessionDescription *session_description);
|
|
|
|
extern void Rust_releaseV4(struct RffiConnectionParametersV4 *session_description);
|
|
|
|
extern struct RffiSessionDescription *Rust_sessionDescriptionFromV4(bool offer,
|
|
const struct RffiConnectionParametersV4 *v4);
|
|
|
|
extern struct RffiSessionDescription *Rust_localDescriptionForGroupCall(const char *ice_ufrag,
|
|
const char *ice_pwd,
|
|
const uint8_t (*_dtls_fingerprint_sha256)[32],
|
|
uint32_t demux_id);
|
|
|
|
extern struct RffiSessionDescription *Rust_remoteDescriptionForGroupCall(const char *ice_ufrag,
|
|
const char *ice_pwd,
|
|
const uint8_t (*_dtls_fingerprint_sha256)[32],
|
|
const uint32_t *demux_ids_data,
|
|
size_t demux_ids_len);
|
|
|
|
extern void Rust_releaseSessionDescription(struct RffiSessionDescription *sdi);
|
|
|
|
extern const struct RffiStatsObserver *Rust_createStatsObserver(RustObject stats_observer,
|
|
const void *stats_observer_cbs);
|
|
|
|
#endif /* CBINDGEN_BINDINGS_H */
|