Commit 0e8d7a32 authored by Guillaume Beraudo's avatar Guillaume Beraudo

Simplified ZRTP API + old ARM versions.

parent 9cdfa6c8
......@@ -58,19 +58,25 @@ LOCAL_CFLAGS += \
-include $(LOCAL_PATH)/build/android/ortp_AndroidConfig.h
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
ifeq ($(BUILD_GPLV3_ZRTP), 1)
LOCAL_CFLAGS += -DHAVE_zrtp
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SHARED_LIBRARIES += libzrtpcpp
LOCAL_C_INCLUDES += $(ZRTP_C_INCLUDE)
else
LOCAL_STATIC_LIBRARIES += libzrtpcpp-static
endif
LOCAL_CFLAGS += -DHAVE_zrtp
LOCAL_C_INCLUDES += $(ZRTP_C_INCLUDE)
endif #ZRTP
ifeq ($(BUILD_SRTP), 1)
LOCAL_CFLAGS += -DHAVE_SRTP
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SHARED_LIBRARIES += libsrtp
LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE)
endif
else
LOCAL_STATIC_LIBRARIES += libsrtp-static
endif
LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE)
LOCAL_CFLAGS += -DHAVE_SRTP
endif #SRTP
LOCAL_C_INCLUDES += \
$(LOCAL_PATH) \
......
......@@ -42,6 +42,11 @@ struct _OrtpEventData{
union {
int telephone_event;
int payload_type;
bool_t zrtp_stream_encrypted;
struct _ZrtpSas{
char sas[5]; // 4 characters
bool_t verified;
} zrtp_sas;
} info;
};
......@@ -64,6 +69,9 @@ OrtpEventType ortp_event_get_type(const OrtpEvent *ev);
#define ORTP_EVENT_TELEPHONE_EVENT 3
#define ORTP_EVENT_RTCP_PACKET_RECEIVED 4 /**<when a RTCP packet is received from far end */
#define ORTP_EVENT_RTCP_PACKET_EMITTED 5 /**<fired when oRTP decides to send an automatic RTCP SR or RR */
#define ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED 6
#define ORTP_EVENT_ZRTP_SAS_READY 7
OrtpEventData * ortp_event_get_data(OrtpEvent *ev);
void ortp_event_destroy(OrtpEvent *ev);
OrtpEvent *ortp_event_dup(OrtpEvent *ev);
......
......@@ -38,28 +38,9 @@
extern "C"{
#endif
typedef void (*OrtpZrtpSasReady)(void *data, const char *sas, bool_t verified);
typedef void (*OrtpZrtpSecretsOff)(void *data);
typedef void (*OrtpZrtpGoClear)(void *data);
typedef void (*OrtpZrtpEncryptionChanged)(void *data, bool_t encrypted);
/**
* This structure holds all callbacks that the UI should implement.
* Mandatory ones are: sas_ready
**/
typedef struct _OrtpZrtpUiCb {
OrtpZrtpSasReady sas_ready; /**<Notifies when the Short Authentication String is ready*/
OrtpZrtpSecretsOff secrets_off;
OrtpZrtpGoClear go_clear;
OrtpZrtpEncryptionChanged encryption_changed;
void *data;
} OrtpZrtpUiCb;
typedef struct OrtpZrtpParams {
const char *zid; // ZRTP identifier (96 bits)
const char *zid_file; // File where to store secrets and other information
OrtpZrtpUiCb *ui_cbs; // User call back functions
} OrtpZrtpParams;
typedef struct _OrtpZrtpContext OrtpZrtpContext ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment