1 |
dragonheart 08/05/01 13:17:30 |
2 |
|
3 |
Added: twinkle-1.2-zrtp.patch |
4 |
Log: |
5 |
introduce compatibility for zrtp-1.1. remove old version. fix stable version to not depend on new zrtp |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-im/twinkle/files/twinkle-1.2-zrtp.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-im/twinkle/files/twinkle-1.2-zrtp.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-im/twinkle/files/twinkle-1.2-zrtp.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: twinkle-1.2-zrtp.patch |
15 |
=================================================================== |
16 |
diff -ru twinkle-1.2-orig/configure.in twinkle-1.2/configure.in |
17 |
--- twinkle-1.2-orig/configure.in 2008-03-09 19:28:14.000000000 +1100 |
18 |
+++ twinkle-1.2/configure.in 2008-05-01 22:19:00.000000000 +1000 |
19 |
@@ -256,6 +256,10 @@ |
20 |
AC_CHECK_HEADER(libzrtpcpp/ZrtpQueue.h, [], |
21 |
[AC_MSG_ERROR([zrtp header files missing])]) |
22 |
AC_DEFINE(HAVE_ZRTP, 1, [Define to 1 if you have the <libzrtpcpp> library.]) |
23 |
+ AC_CHECK_HEADER(libzrtpcpp/ZrtpCodes.h, |
24 |
+ [AC_DEFINE(HAVE_ZRTP_1_1, 1, [Define to 1 if you have the <libzrtpcpp> library version 1.1 or later.]) |
25 |
+ AC_DEFINE(ZRTP_NAMESPACE(x), GnuZrtpCodes::x, [namespace macro required to cause compatiblity beween zrtp 1.1 and previous versions])], |
26 |
+ [AC_DEFINE(ZRTP_NAMESPACE(x), x, [namespace macro required to cause compatiblity beween zrtp 1.1 and previous versions])]) |
27 |
LIBS="-lzrtpcpp $LIBS" |
28 |
echo "LIBS += -lzrtpcpp" >> $QT_INCL_PRO |
29 |
have_zrtp="yes" |
30 |
diff -ru twinkle-1.2-orig/src/audio/twinkle_zrtp_ui.h twinkle-1.2/src/audio/twinkle_zrtp_ui.h |
31 |
--- twinkle-1.2-orig/src/audio/twinkle_zrtp_ui.h 2008-02-27 08:10:48.000000000 +1100 |
32 |
+++ twinkle-1.2/src/audio/twinkle_zrtp_ui.h 2008-05-01 22:25:01.000000000 +1000 |
33 |
@@ -30,6 +30,9 @@ |
34 |
#include <iostream> |
35 |
#include <libzrtpcpp/ZrtpQueue.h> |
36 |
#include <libzrtpcpp/ZrtpUserCallback.h> |
37 |
+#ifdef HAVE_ZRTP_1_1 |
38 |
+#include <libzrtpcpp/ZrtpCodes.h> |
39 |
+#endif |
40 |
#include "audio_session.h" |
41 |
#include "userintf.h" |
42 |
|
43 |
@@ -44,8 +47,8 @@ |
44 |
virtual void secureOff(); |
45 |
virtual void showSAS(std::string sas); |
46 |
virtual void confirmGoClear(); |
47 |
- virtual void showMessage(MessageSeverity sev, std::string message); |
48 |
- virtual void zrtpNegotiationFailed(MessageSeverity severity, std::string msg); |
49 |
+ virtual void showMessage(ZRTP_NAMESPACE(MessageSeverity) sev, std::string message); |
50 |
+ virtual void zrtpNegotiationFailed(ZRTP_NAMESPACE(MessageSeverity) severity, std::string msg); |
51 |
virtual void zrtpNotSuppOther(); |
52 |
|
53 |
private: |
54 |
--- twinkle-1.2-orig/src/audio/twinkle_zrtp_ui.cpp 2008-02-27 08:10:50.000000000 +1100 |
55 |
+++ twinkle-1.2/src/audio/twinkle_zrtp_ui.cpp 2008-05-01 22:49:54.000000000 +1000 |
56 |
@@ -32,7 +32,11 @@ |
57 |
extern t_phone *phone; |
58 |
|
59 |
TwinkleZrtpUI::TwinkleZrtpUI(ZrtpQueue* queue, t_audio_session* session) : |
60 |
+#ifdef HAVE_ZRTP_1_1 |
61 |
+ ZrtpUserCallback((const ZrtpUserCallback&) queue), audioSession(session) |
62 |
+#else |
63 |
ZrtpUserCallback(queue), audioSession(session) |
64 |
+#endif |
65 |
{} |
66 |
|
67 |
void TwinkleZrtpUI::secureOn(std::string cipher) { |
68 |
@@ -96,7 +100,7 @@ |
69 |
ui->cb_async_zrtp_confirm_go_clear(lineno); |
70 |
} |
71 |
|
72 |
-void TwinkleZrtpUI::showMessage(MessageSeverity sev, std::string message) { |
73 |
+void TwinkleZrtpUI::showMessage(ZRTP_NAMESPACE(MessageSeverity) sev, std::string message) { |
74 |
t_line *line = audioSession->get_line(); |
75 |
int lineno = line->get_line_number(); |
76 |
|
77 |
@@ -106,11 +110,11 @@ |
78 |
msg += message; |
79 |
|
80 |
switch (sev) { |
81 |
- case Info: |
82 |
+ case ZRTP_NAMESPACE(Info): |
83 |
log_file->write_report(msg, "TwinkleZrtpUI::showMessage", LOG_NORMAL, |
84 |
LOG_INFO); |
85 |
break; |
86 |
- case Warning: |
87 |
+ case ZRTP_NAMESPACE(Warning): |
88 |
log_file->write_report(msg, "TwinkleZrtpUI::showMessage", LOG_NORMAL, |
89 |
LOG_WARNING); |
90 |
break; |
91 |
@@ -120,7 +124,7 @@ |
92 |
} |
93 |
} |
94 |
|
95 |
-void TwinkleZrtpUI::zrtpNegotiationFailed(MessageSeverity severity, std::string msg) { |
96 |
+void TwinkleZrtpUI::zrtpNegotiationFailed(ZRTP_NAMESPACE(MessageSeverity) severity, std::string msg) { |
97 |
t_line *line = audioSession->get_line(); |
98 |
int lineno = line->get_line_number(); |
99 |
|
100 |
@@ -130,11 +134,11 @@ |
101 |
m += msg; |
102 |
|
103 |
switch (severity) { |
104 |
- case Info: |
105 |
+ case ZRTP_NAMESPACE(Info): |
106 |
log_file->write_report(m, "TwinkleZrtpUI::zrtpNegotiationFailed", LOG_NORMAL, |
107 |
LOG_INFO); |
108 |
break; |
109 |
- case Warning: |
110 |
+ case ZRTP_NAMESPACE(Warning): |
111 |
log_file->write_report(m, "TwinkleZrtpUI::zrtpNegotiationFailed", LOG_NORMAL, |
112 |
LOG_WARNING); |
113 |
break; |
114 |
|
115 |
|
116 |
|
117 |
-- |
118 |
gentoo-commits@l.g.o mailing list |