r2998 - in branches/rtcp_ntp: . aec codecs codecs/g711 codecs/ilbc
conf include ipsec mediahandler minisip minisip/confbackend
minisip/contactdb minisip/gui minisip/gui/gtkgui
minisip/ipprovider p2t rtp sdp sip soundcard spaudio stun
video video/grabber
mikma at minisip.org
mikma at minisip.org
Thu Dec 7 00:06:44 CET 2006
Author: mikma
Date: 2006-12-07 00:06:42 +0100 (Thu, 07 Dec 2006)
New Revision: 2998
Added:
branches/rtcp_ntp/include/compilation_config_w32_wce.h
branches/rtcp_ntp/include/minisip_wce_extra_includes.h
branches/rtcp_ntp/soundcard/WaveSoundDevice.cpp
branches/rtcp_ntp/soundcard/WaveSoundDevice.h
Modified:
branches/rtcp_ntp/
branches/rtcp_ntp/aec/Makefile.am
branches/rtcp_ntp/aec/aec.cxx
branches/rtcp_ntp/aec/aec.h
branches/rtcp_ntp/codecs/Codec.cxx
branches/rtcp_ntp/codecs/Codec.h
branches/rtcp_ntp/codecs/G711CODEC.cxx
branches/rtcp_ntp/codecs/G711CODEC.h
branches/rtcp_ntp/codecs/ILBCCODEC.cxx
branches/rtcp_ntp/codecs/ILBCCODEC.h
branches/rtcp_ntp/codecs/Makefile.am
branches/rtcp_ntp/codecs/SPEEXCODEC.cxx
branches/rtcp_ntp/codecs/SPEEXCODEC.h
branches/rtcp_ntp/codecs/g711/Makefile.am
branches/rtcp_ntp/codecs/g711/codec_g711.h
branches/rtcp_ntp/codecs/ilbc/Makefile.am
branches/rtcp_ntp/codecs/ilbc/iCBSearch.cxx
branches/rtcp_ntp/conf/ConfCallback.h
branches/rtcp_ntp/conf/ConfMember.h
branches/rtcp_ntp/conf/ConferenceControl.cxx
branches/rtcp_ntp/conf/ConferenceControl.h
branches/rtcp_ntp/conf/Makefile.am
branches/rtcp_ntp/configure.ac
branches/rtcp_ntp/include/config.h
branches/rtcp_ntp/ipsec/Makefile.am
branches/rtcp_ntp/mediahandler/AudioMedia.cxx
branches/rtcp_ntp/mediahandler/AudioMedia.h
branches/rtcp_ntp/mediahandler/DtmfSender.cxx
branches/rtcp_ntp/mediahandler/DtmfSender.h
branches/rtcp_ntp/mediahandler/KeyAgreement.cxx
branches/rtcp_ntp/mediahandler/Makefile.am
branches/rtcp_ntp/mediahandler/Media.cxx
branches/rtcp_ntp/mediahandler/Media.h
branches/rtcp_ntp/mediahandler/MediaCommandString.cxx
branches/rtcp_ntp/mediahandler/MediaCommandString.h
branches/rtcp_ntp/mediahandler/MediaHandler.cxx
branches/rtcp_ntp/mediahandler/MediaHandler.h
branches/rtcp_ntp/mediahandler/MediaStream.cxx
branches/rtcp_ntp/mediahandler/MediaStream.h
branches/rtcp_ntp/mediahandler/RtpReceiver.cxx
branches/rtcp_ntp/mediahandler/RtpReceiver.h
branches/rtcp_ntp/mediahandler/Session.cxx
branches/rtcp_ntp/mediahandler/Session.h
branches/rtcp_ntp/mediahandler/SessionRegistry.cxx
branches/rtcp_ntp/mediahandler/SessionRegistry.h
branches/rtcp_ntp/minisip/Bell.cxx
branches/rtcp_ntp/minisip/ConsoleDebugger.cxx
branches/rtcp_ntp/minisip/ConsoleDebugger.h
branches/rtcp_ntp/minisip/LocationDetector.cxx
branches/rtcp_ntp/minisip/LogEntry.cxx
branches/rtcp_ntp/minisip/LogEntry.h
branches/rtcp_ntp/minisip/Makefile.am
branches/rtcp_ntp/minisip/MessageRouter.cxx
branches/rtcp_ntp/minisip/MessageRouter.h
branches/rtcp_ntp/minisip/Minisip.cxx
branches/rtcp_ntp/minisip/Minisip.h
branches/rtcp_ntp/minisip/confbackend/ConfBackend.cxx
branches/rtcp_ntp/minisip/confbackend/ConfBackend.h
branches/rtcp_ntp/minisip/confbackend/GConfBackend.cxx
branches/rtcp_ntp/minisip/confbackend/GConfBackend.h
branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.cxx
branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.h
branches/rtcp_ntp/minisip/confbackend/Makefile.am
branches/rtcp_ntp/minisip/contactdb/ContactDb.cxx
branches/rtcp_ntp/minisip/contactdb/ContactDb.h
branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.cxx
branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.h
branches/rtcp_ntp/minisip/contactdb/Makefile.am
branches/rtcp_ntp/minisip/contactdb/PhoneBook.cxx
branches/rtcp_ntp/minisip/contactdb/PhoneBook.h
branches/rtcp_ntp/minisip/gui/Gui.cxx
branches/rtcp_ntp/minisip/gui/Gui.h
branches/rtcp_ntp/minisip/gui/GuiCallback.h
branches/rtcp_ntp/minisip/gui/Makefile.am
branches/rtcp_ntp/minisip/gui/gtkgui/CallWidget.h
branches/rtcp_ntp/minisip/gui/gtkgui/CertificateDialog.cxx
branches/rtcp_ntp/minisip/gui/gtkgui/DtmfWidget.h
branches/rtcp_ntp/minisip/gui/gtkgui/ImWidget.h
branches/rtcp_ntp/minisip/gui/gtkgui/LogWidget.cxx
branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.cxx
branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.h
branches/rtcp_ntp/minisip/gui/gtkgui/Makefile.am
branches/rtcp_ntp/minisip/gui/gtkgui/PhoneBook.cxx
branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.cxx
branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.h
branches/rtcp_ntp/minisip/ipprovider/IpProvider.cxx
branches/rtcp_ntp/minisip/ipprovider/IpProvider.h
branches/rtcp_ntp/minisip/ipprovider/Makefile.am
branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.cxx
branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.h
branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.cxx
branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.h
branches/rtcp_ntp/p2t/GroupListClient.cxx
branches/rtcp_ntp/p2t/GroupListServer.cxx
branches/rtcp_ntp/p2t/GroupListUserElement.h
branches/rtcp_ntp/p2t/Makefile.am
branches/rtcp_ntp/p2t/P2T.cxx
branches/rtcp_ntp/p2t/P2T.h
branches/rtcp_ntp/p2t/RtcpAPP.cxx
branches/rtcp_ntp/p2t/RtcpAPP.h
branches/rtcp_ntp/p2t/RtcpAPPHeader.h
branches/rtcp_ntp/p2t/RtcpReceiver.cxx
branches/rtcp_ntp/p2t/RtcpSender.cxx
branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.cxx
branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.h
branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.cxx
branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.h
branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.cxx
branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.h
branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.cxx
branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.h
branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.cxx
branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.h
branches/rtcp_ntp/rtp/CryptoContext.cxx
branches/rtcp_ntp/rtp/Makefile.am
branches/rtcp_ntp/rtp/RtcpPacket.h
branches/rtcp_ntp/rtp/RtcpReportSDES.cxx
branches/rtcp_ntp/rtp/RtpHeader.h
branches/rtcp_ntp/rtp/RtpPacket.cxx
branches/rtcp_ntp/rtp/SDESItem.h
branches/rtcp_ntp/rtp/SDES_EMAIL.cxx
branches/rtcp_ntp/rtp/SDES_EMAIL.h
branches/rtcp_ntp/rtp/SDES_LOC.cxx
branches/rtcp_ntp/rtp/SDES_NAME.cxx
branches/rtcp_ntp/rtp/SDES_NAME.h
branches/rtcp_ntp/rtp/SDES_NOTE.cxx
branches/rtcp_ntp/rtp/SDES_NOTE.h
branches/rtcp_ntp/rtp/SDES_PHONE.cxx
branches/rtcp_ntp/rtp/SDES_TOOL.cxx
branches/rtcp_ntp/rtp/SDES_TOOL.h
branches/rtcp_ntp/rtp/SRtpPacket.cxx
branches/rtcp_ntp/sdp/Makefile.am
branches/rtcp_ntp/sdp/SdpHeader.h
branches/rtcp_ntp/sdp/SdpHeaderC.cxx
branches/rtcp_ntp/sip/DefaultDialogHandler.cxx
branches/rtcp_ntp/sip/Makefile.am
branches/rtcp_ntp/sip/PresenceMessageContent.h
branches/rtcp_ntp/sip/Sip.cxx
branches/rtcp_ntp/sip/SipDialogConfVoip.cxx
branches/rtcp_ntp/sip/SipDialogPresenceClient.cxx
branches/rtcp_ntp/sip/SipDialogPresenceServer.cxx
branches/rtcp_ntp/sip/SipDialogSecurityConfig.cxx
branches/rtcp_ntp/sip/SipDialogSecurityConfig.h
branches/rtcp_ntp/sip/SipDialogVoip.cxx
branches/rtcp_ntp/sip/SipSoftPhoneConfiguration.cxx
branches/rtcp_ntp/sip/SipSoftPhoneConfiguration.h
branches/rtcp_ntp/soundcard/AlsaCard.cxx
branches/rtcp_ntp/soundcard/AlsaCard.h
branches/rtcp_ntp/soundcard/AudioMixer.cxx
branches/rtcp_ntp/soundcard/AudioMixer.h
branches/rtcp_ntp/soundcard/AudioMixerSimple.cxx
branches/rtcp_ntp/soundcard/AudioMixerSimple.h
branches/rtcp_ntp/soundcard/AudioMixerSpatial.cxx
branches/rtcp_ntp/soundcard/AudioMixerSpatial.h
branches/rtcp_ntp/soundcard/DirectSoundDevice.cxx
branches/rtcp_ntp/soundcard/DirectSoundDevice.h
branches/rtcp_ntp/soundcard/FileSoundDevice.cxx
branches/rtcp_ntp/soundcard/FileSoundDevice.h
branches/rtcp_ntp/soundcard/FileSoundSource.h
branches/rtcp_ntp/soundcard/Makefile.am
branches/rtcp_ntp/soundcard/OssSoundDevice.cxx
branches/rtcp_ntp/soundcard/SilenceSensor.h
branches/rtcp_ntp/soundcard/SoundDevice.cxx
branches/rtcp_ntp/soundcard/SoundDevice.h
branches/rtcp_ntp/soundcard/SoundIO.cxx
branches/rtcp_ntp/soundcard/SoundIO.h
branches/rtcp_ntp/soundcard/SoundIOPLCInterface.h
branches/rtcp_ntp/soundcard/SoundRecorderCallback.h
branches/rtcp_ntp/soundcard/SoundSource.cxx
branches/rtcp_ntp/soundcard/SoundSource.h
branches/rtcp_ntp/spaudio/Makefile.am
branches/rtcp_ntp/spaudio/SpAudio.cxx
branches/rtcp_ntp/spaudio/SpAudio.h
branches/rtcp_ntp/stun/Makefile.am
branches/rtcp_ntp/stun/STUN.h
branches/rtcp_ntp/stun/STUNAttributes.h
branches/rtcp_ntp/stun/STUNTest.cxx
branches/rtcp_ntp/video/Makefile.am
branches/rtcp_ntp/video/grabber/Dc1394Grabber.cxx
branches/rtcp_ntp/video/grabber/V4LGrabber.cxx
Log:
Merged revisions 1926-2026 via svnmerge from
svn://mikma@svn.minisip.org/minisip/trunk/minisip
Property changes on: branches/rtcp_ntp
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/minisip:1-1925
+ /trunk/minisip:1-2026
Modified: branches/rtcp_ntp/aec/Makefile.am
===================================================================
--- branches/rtcp_ntp/aec/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/aec/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,7 +1,6 @@
-noinst_LIBRARIES = libaec.a
-
-libaec_a_SOURCES = aec.cxx
-
+noinst_LTLIBRARIES = libaec.la
+libaec_la_SOURCES = aec.cxx
+
noinst_HEADERS = aec.h
Modified: branches/rtcp_ntp/aec/aec.cxx
===================================================================
--- branches/rtcp_ntp/aec/aec.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/aec/aec.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -16,8 +16,10 @@
#include <string.h>
#include "aec.h"
+#ifdef _WIN32_WCE
+# define M_PI 3.14159265358979323846 /* pi */
+#endif
-
/* ================================================================ */
/* Exponential Smoothing or IIR Infinite Impulse Response Filter */
@@ -49,7 +51,7 @@
FIR1::FIR1()
{
- float x = exp(-2.0 * M_PI * PreWhiteTransferFreq/8000.0f);
+ float x = (float) exp(-2.0 * M_PI * PreWhiteTransferFreq/8000.0f);
a0 = (1.0f + x) / 2.0f;
a1 = -(1.0f + x) / 2.0f;
@@ -217,7 +219,7 @@
} else if (s0 < -MAXPCM) {
return (int)-MAXPCM;
} else {
- return (int)floorf(s0+0.5);
+ return (int)floorf( ( float)(s0+0.5) );
}
}
Modified: branches/rtcp_ntp/aec/aec.h
===================================================================
--- branches/rtcp_ntp/aec/aec.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/aec/aec.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -73,7 +73,7 @@
public:
IIR6();
float highpass(float in) {
- const float AlphaHp = 0.075; /* controls Transfer Frequence */
+ const float AlphaHp = (float)0.075; /* controls Transfer Frequence */
const float Gain6 = 1.45f; /* gain to undo filter attenuation */
/* Highpass = Signal - Lowpass. Lowpass = Exponential Smoothing */
Modified: branches/rtcp_ntp/codecs/Codec.cxx
===================================================================
--- branches/rtcp_ntp/codecs/Codec.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/Codec.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,7 +20,6 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"Codec.h"
#include"G711CODEC.h"
#include"ILBCCODEC.h"
Modified: branches/rtcp_ntp/codecs/Codec.h
===================================================================
--- branches/rtcp_ntp/codecs/Codec.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/Codec.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,14 +23,14 @@
#ifndef CODECINTERFACE_H
#define CODECINTERFACE_H
+#include<config.h>
+
#include<sys/types.h>
#include<string>
#include<libmutil/MemObject.h>
-using namespace std;
-
class Codec;
class CodecState;
Modified: branches/rtcp_ntp/codecs/G711CODEC.cxx
===================================================================
--- branches/rtcp_ntp/codecs/G711CODEC.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/G711CODEC.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,13 +20,13 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-
#include"G711CODEC.h"
#include"g711/codec_g711.h"
#include<libmutil/massert.h>
#include<iostream>
+using namespace std;
+
G711Codec::G711Codec(){
}
Modified: branches/rtcp_ntp/codecs/G711CODEC.h
===================================================================
--- branches/rtcp_ntp/codecs/G711CODEC.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/G711CODEC.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -70,13 +70,13 @@
virtual int32_t getInputNrSamples();
- virtual string getCodecName();
+ virtual std::string getCodecName();
- virtual string getCodecDescription();
+ virtual std::string getCodecDescription();
virtual uint8_t getSdpMediaType();
- virtual string getSdpMediaAttributes();
+ virtual std::string getSdpMediaAttributes();
virtual std::string getMemObjectType(){return "G711Codec";}
Modified: branches/rtcp_ntp/codecs/ILBCCODEC.cxx
===================================================================
--- branches/rtcp_ntp/codecs/ILBCCODEC.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/ILBCCODEC.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -19,14 +19,16 @@
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
*/
+#include"ILBCCODEC.h"
-
#include"ilbc/iLBC_define.h"
#include"ilbc/iLBC_encode.h"
#include"ilbc/iLBC_decode.h"
-#include"ILBCCODEC.h"
+
#include<libmutil/massert.h>
+using namespace std;
+
ILBCCodecState::ILBCCodecState(){
initEncode(&enc_inst);
initDecode(&dec_inst, 1);
Modified: branches/rtcp_ntp/codecs/ILBCCODEC.h
===================================================================
--- branches/rtcp_ntp/codecs/ILBCCODEC.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/ILBCCODEC.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -31,6 +31,7 @@
#include"ilbc/iLBC_encode.h"
#include"ilbc/iLBC_decode.h"
+#include<string>
class ILBCCodecState : public CodecState{
public:
@@ -80,13 +81,13 @@
virtual int32_t getInputNrSamples();
- virtual string getCodecName();
+ virtual std::string getCodecName();
- virtual string getCodecDescription();
+ virtual std::string getCodecDescription();
virtual uint8_t getSdpMediaType();
- virtual string getSdpMediaAttributes();
+ virtual std::string getSdpMediaAttributes();
};
#endif
Modified: branches/rtcp_ntp/codecs/Makefile.am
===================================================================
--- branches/rtcp_ntp/codecs/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,17 +1,20 @@
SUBDIRS = g711 ilbc
-noinst_LIBRARIES = libcodecs.a
+noinst_LTLIBRARIES = libcodecs.la
-libcodecs_a_SOURCES = ILBCCODEC.cxx \
+libcodecs_la_SOURCES = ILBCCODEC.cxx \
G711CODEC.cxx \
Codec.cxx
+libcodecs_la_LIBADD =
if HAS_SPEEX
-libcodecs_a_SOURCES += SPEEXCODEC.cxx
+libcodecs_la_SOURCES += SPEEXCODEC.cxx
+libcodecs_la_LIBADD += $(SPEEX_LIBS)
endif
if HAS_GSM
-libcodecs_a_SOURCES += GsmCodec.cxx
+libcodecs_la_SOURCES += GsmCodec.cxx
+libcodecs_la_LIBADD += $(GSM_LIBS)
endif
noinst_HEADERS = G711CODEC.h \
Modified: branches/rtcp_ntp/codecs/SPEEXCODEC.cxx
===================================================================
--- branches/rtcp_ntp/codecs/SPEEXCODEC.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/SPEEXCODEC.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -19,10 +19,7 @@
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#ifdef HAS_SPEEX
-
#include"SPEEXCODEC.h"
#include<iostream>
@@ -167,5 +164,3 @@
return ret;
}
-#endif
-
Modified: branches/rtcp_ntp/codecs/SPEEXCODEC.h
===================================================================
--- branches/rtcp_ntp/codecs/SPEEXCODEC.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/SPEEXCODEC.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef SpeexCodec_H
#define SpeexCodec_H
+
+#include<config.h>
#include"Codec.h"
@@ -89,13 +91,13 @@
virtual int32_t getInputNrSamples();
- virtual string getCodecName();
+ virtual std::string getCodecName();
- virtual string getCodecDescription();
+ virtual std::string getCodecDescription();
virtual uint8_t getSdpMediaType();
- virtual string getSdpMediaAttributes();
+ virtual std::string getSdpMediaAttributes();
};
Modified: branches/rtcp_ntp/codecs/g711/Makefile.am
===================================================================
--- branches/rtcp_ntp/codecs/g711/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/g711/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,5 +1,5 @@
-noinst_LIBRARIES = libcodec_g711.a
+noinst_LTLIBRARIES = libcodec_g711.la
-libcodec_g711_a_SOURCES = codec_g711.cxx
+libcodec_g711_la_SOURCES = codec_g711.cxx
noinst_HEADERS = codec_g711.h
Modified: branches/rtcp_ntp/codecs/g711/codec_g711.h
===================================================================
--- branches/rtcp_ntp/codecs/g711/codec_g711.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/g711/codec_g711.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -11,6 +11,8 @@
#ifndef CODEC_G711_H
#define CODEC_G711_H
+
+#include<config.h>
unsigned char linear2alaw(short pcm_val); /* 2's complement (16-bit range) */
Modified: branches/rtcp_ntp/codecs/ilbc/Makefile.am
===================================================================
--- branches/rtcp_ntp/codecs/ilbc/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/ilbc/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libcodec_ilbc.a
+noinst_LTLIBRARIES = libcodec_ilbc.la
-libcodec_ilbc_a_SOURCES = anaFilter.cxx \
+libcodec_ilbc_la_SOURCES = anaFilter.cxx \
constants.cxx \
createCB.cxx \
doCPLC.cxx \
Modified: branches/rtcp_ntp/codecs/ilbc/iCBSearch.cxx
===================================================================
--- branches/rtcp_ntp/codecs/ilbc/iCBSearch.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/codecs/ilbc/iCBSearch.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -121,7 +121,7 @@
pp=buf+LPC_FILTERORDER+lMem-lTarget;
for (j=0; j<lTarget; j++) {
- *ppe+=(*pp)*(*pp++);
+ *ppe+=(float)(*pp) * ( (float)(*pp)++);
}
if(*ppe>0.0) {
@@ -302,7 +302,7 @@
pp=cbvectors+lMem-lTarget;
for (j=0; j<lTarget; j++) {
- *ppe+=(*pp)*(*pp++);
+ *ppe+=(*pp)* ( (*pp)++);
}
ppi = cbvectors + lMem - 1 - lTarget;
Modified: branches/rtcp_ntp/conf/ConfCallback.h
===================================================================
--- branches/rtcp_ntp/conf/ConfCallback.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/conf/ConfCallback.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -35,6 +35,7 @@
class ConfCallback{
public:
+ virtual ~ConfCallback() {}
//virtual void guicb_handleConfCommand(string &)=0;
virtual void confcb_handleSipCommand(string &)=0;
virtual void confcb_handleSipCommand(CommandString &)=0;
Modified: branches/rtcp_ntp/conf/ConfMember.h
===================================================================
--- branches/rtcp_ntp/conf/ConfMember.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/conf/ConfMember.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -11,6 +11,8 @@
//
#ifndef _CONFMEMBER_H
#define _CONFMEMBER_H
+
+#include<config.h>
class ConfMember {
public:
@@ -23,9 +25,6 @@
string uri;
string callid;
-
-
-
};
Modified: branches/rtcp_ntp/conf/ConferenceControl.cxx
===================================================================
--- branches/rtcp_ntp/conf/ConferenceControl.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/conf/ConferenceControl.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -19,30 +19,25 @@
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
*/
+
+#include"ConferenceControl.h"
-#include<config.h>
#include<assert.h>
#include<stdio.h>
#include<vector>
-#include"ConferenceControl.h"
#include"../minisip/MessageRouter.h"
#include"../minisip/gui/Gui.h"
-//#include"../minisip/gui/textui/MinisipTextUI.h"
+
#include<libmutil/MemObject.h>
#include<libmutil/trim.h>
#include<libmutil/termmanip.h>
#include<libmutil/CommandString.h>
-#include<libmsip/SipDialogContainer.h>
#include<libmsip/SipCommandString.h>
-//#include"../sip/DefaultDialogHandler.h"
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
-//extern TextUI *debugtextui;
-
-
-
-
-
ConferenceControl::ConferenceControl(){
numPending = 0;
@@ -554,19 +549,19 @@
CommandString cmd(confId,"list updated",connectedusers,pendingusers);
callback->confcb_handleGuiCommand(cmd);
}
-void ConferenceControl::handleOkAck(string callid, minilist<ConfMember> *list) {
+void ConferenceControl::handleOkAck(string callid, minilist<ConfMember> *conflist) {
pendingToConnected(callid);
- updateLists(list);
+ updateLists(conflist);
sendUpdatesToGui();
}
/**
* Print a list of conference members
*/
-void ConferenceControl::printList(minilist<ConfMember> *list) {
- for (int i = 0; i < list->size(); i++ ) {
- cerr << "Member : " + ((*list)[i]).uri << endl;
- cerr << "CallId : " + ((*list)[i]).callid << endl;
+void ConferenceControl::printList(minilist<ConfMember> *conflist) {
+ for (int i = 0; i < conflist->size(); i++ ) {
+ cerr << "Member : " + ((*conflist)[i]).uri << endl;
+ cerr << "CallId : " + ((*conflist)[i]).callid << endl;
}
}
@@ -627,12 +622,12 @@
/**
* Check for new members to connect to
*/
-void ConferenceControl::updateLists(minilist<ConfMember> *list) {
+void ConferenceControl::updateLists(minilist<ConfMember> *conflist) {
bool handled = false;
- for (int i = 0; i < list->size(); i++) {
- string current = (*list)[i].uri;
+ for (int i = 0; i < conflist->size(); i++) {
+ string current = (*conflist)[i].uri;
//check against pending list
for (int j = 0; j < pendingList.size(); j++ ) {
Modified: branches/rtcp_ntp/conf/ConferenceControl.h
===================================================================
--- branches/rtcp_ntp/conf/ConferenceControl.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/conf/ConferenceControl.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,24 +22,17 @@
#ifndef _CONFERENCECONTROL_H
#define _CONFERENCECONTROL_H
+
+#include<config.h>
-#include<string>
+#include<string>
+
#include<libmutil/CommandString.h>
-//#include"../sip/SipSoftPhoneConfiguration.h"
-//#include"../minisip/gui/Gui.h"
-//#include"../../../p2t/GroupList.h"
-//#include"../../../p2t/GroupListClient.h"
-//#include"../p2t/GroupListUserElement.h"
-//#include"../p2t/P2T.h"
-//#include<libmutil/TextUI.h>
-#include<libmutil/minilist.h>
-#include "ConfCallback.h"
+#include<libmutil/minilist.h>
-
+#include "ConfCallback.h"
#include "ConfMember.h"
-
-using namespace std;
/**
* A text user interface.
* The interface interacts with the user via the terminal, and with the <code>Sip</code> class
Modified: branches/rtcp_ntp/conf/Makefile.am
===================================================================
--- branches/rtcp_ntp/conf/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/conf/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,8 +1,7 @@
-noinst_LIBRARIES = libconf.a
-
-libconf_a_SOURCES = ConferenceControl.cxx \
+noinst_LTLIBRARIES = libconf.la
+
+libconf_la_SOURCES = ConferenceControl.cxx \
ConfCallback.cxx
-
noinst_HEADERS = ConferenceControl.h \
ConfCallback.h \
Modified: branches/rtcp_ntp/configure.ac
===================================================================
--- branches/rtcp_ntp/configure.ac 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/configure.ac 2006-12-06 23:06:42 UTC (rev 2998)
@@ -79,6 +79,11 @@
AC_MSG_RESULT(${reloc_result})
AC_SUBST(RELOC_LDFLAGS)
+dnl Add linker flag to enable the stack trace
+
+LDFLAGS="${LDFLAGS} -rdynamic"
+
+
dnl Check types
AC_CHECK_TYPES([uint])
@@ -160,7 +165,7 @@
AC_CHECK_HEADER([samplerate.h],
[
AC_CHECK_LIB([samplerate], [main],
- [LIBS="-lsamplerate ${LIBS}"
+ [SAMPLERATE_LIBS="-lsamplerate"
AC_DEFINE(FLOAT_RESAMPLER, [], [Use the advanced floating point based resampler])
FLOAT_RESAMPLER="yes"
]
@@ -168,6 +173,7 @@
]
)
AM_CONDITIONAL(FLOAT_RESAMPLER, test "${FLOAT_RESAMPLER}" = "yes")
+AC_SUBST(SAMPLERATE_LIBS)
dnl Check for stack trace support
AC_CHECK_HEADER([execinfo.h],
@@ -182,24 +188,26 @@
dnl Check for libspeex
AC_CHECK_HEADER([speex/speex.h],
[
- AC_CHECK_LIB([speex], [main],
- [LIBS="-lspeex ${LIBS}"
+ AC_CHECK_LIB([speex], [speex_encoder_init],
+ [SPEEX_LIBS="-lspeex"
AC_DEFINE(HAS_SPEEX, [], [Use the Speex CODEC])])
HAS_SPEEX="yes"
]
)
AM_CONDITIONAL(HAS_SPEEX, test "${HAS_SPEEX}" = "yes")
+AC_SUBST(SPEEX_LIBS)
dnl Check for libgsm
AC_CHECK_HEADER([gsm.h],
[
- AC_CHECK_LIB([gsm], [main],
- [LIBS="-lgsm ${LIBS}"
+ AC_CHECK_LIB([gsm], [gsm_encode],
+ [GSM_LIBS="-lgsm"
AC_DEFINE(HAS_GSM, [], [Use the GSM CODEC])])
HAS_GSM="yes"
]
)
AM_CONDITIONAL(HAS_GSM, test "${HAS_GSM}" = "yes")
+AC_SUBST(GSM_LIBS)
@@ -352,19 +360,37 @@
[ --enable-alsa enables ALSA sound support (default disabled)],
[ if test "${enable_alsa}" = "yes"
then
- AC_CHECK_LIB([asound], [main],,
+ AC_CHECK_LIB([asound], [main],
+ [ALSA_LIBS="-lasound"],
[AC_MSG_ERROR([Could not find the alsa library])]
)
fi ])
AM_CONDITIONAL(HAVE_LIBASOUND, [test "${enable_alsa}" = "yes"])
+AC_SUBST(ALSA_LIBS)
dnl DirectSound sound interface
AC_ARG_ENABLE(dsound,
[ --enable-dsound enables DirectSound sound support (default disabled)],
[ AC_DEFINE(DSOUND, [], [Use DirectSound sound driver]) ])
-AM_CONDITIONAL(DIRECT_SOUND, [test "${enable_dsound}" = "yes"])
+if test ! x$enable_dsound = xno; then
+ have_dsound=yes
+ save_LIBS="${LIBS}"
+ dnl Can't check stdcall function DirectSoundFullDuplexCreate.
+ AC_CHECK_LIB([dsound], [main],,[have_dsound=no])
+ AC_CHECK_LIB([uuid], [GUID_NULL],,[have_dsound=no])
+ AC_CHECK_LIB([dxguid], [IID_IDirectSoundNotify],,[have_dsound=no])
+ AC_CHECK_HEADERS([dsound.h],,[have_dsound=no])
+ if test x$have_dsound = xyes; then
+ DSOUND_LIBS="-ldxguid -luuid -ldsound"
+ elif test x$enable_dsound = xyes; then
+ AC_MSG_ERROR([Could not find libraries required by DirectSound support])
+ fi
+ LIBS="${save_LIBS}"
+ AC_SUBST(DSOUND_LIBS)
+ AM_CONDITIONAL(DIRECT_SOUND, [test "${have_dsound}" = "yes"])
+fi
dnl TEXT UI
AC_ARG_ENABLE(textui,
@@ -595,9 +621,6 @@
dnl Checks for libraries.
AC_CHECK_LIB([gdi32], [main])
AC_CHECK_LIB([wsock32], [main])
-AC_CHECK_LIB([dsound], [main])
-AC_CHECK_LIB([uuid], [main])
-AC_CHECK_LIB([dxguid], [main])
dnl FIXME: Replace `main' with a function in `-lX11':
AC_CHECK_LIB([X11], [main])
Added: branches/rtcp_ntp/include/compilation_config_w32_wce.h
===================================================================
--- branches/rtcp_ntp/include/compilation_config_w32_wce.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/include/compilation_config_w32_wce.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -0,0 +1,78 @@
+#ifndef _MINISIP_COMPILATION_CONFIG
+#define _MINISIP_COMPILATION_CONFIG
+
+#ifdef _WIN32_WCE
+
+/* Debug output */
+#define DEBUG_OUTPUT
+
+//To use include/config.h ... only for compilation time
+#define HAVE_CONFIG_H
+
+//use this to avoid the warning (coming from STLPort used in WinCE)
+//exception.h(47) : warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'Exception'
+#pragma warning (disable: 4275)
+
+/* Define to 1 if you have the <openssl/aes.h> header file. */
+#define HAVE_OPENSSL_AES_H 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+//#define HAVE_UNISTD_H 1
+
+/* No Kerberos in OpenSSL */
+#define OPENSSL_NO_KRB5
+
+/* Name of package */
+#define PACKAGE "minisip"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "eliasson at imit.kth.se"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "minisip"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "minisip 0.9"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "minisip"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.9"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* STL enabled */
+#define USE_STL
+
+/* Version number of package */
+#define VERSION "0.8.1"
+
+#endif
+//_WIN32_WCE
+
+#endif
+//_LIBMUTIL_COMPILATION_CONFIG
+
Property changes on: branches/rtcp_ntp/include/compilation_config_w32_wce.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Modified: branches/rtcp_ntp/include/config.h
===================================================================
--- branches/rtcp_ntp/include/config.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/include/config.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,97 +23,96 @@
#ifndef CONFIG_H
#define CONFIG_H
+/* Compilation time configuration */
+#ifndef _WIN32_WCE
+# include"compilation_config.h"
+#else
+# include"compilation_config_w32_wce.h"
+#endif
+
+#include<libmutil/mtypes.h>
+
#define LIBMUTIL_IMPORTS
#define LIBMNETUTIL_IMPORTS
#define LIBMSIP_IMPORTS
#define LIBMIKEY_IMPORTS
+#define SOUND_CARD_FREQ 48000
+#include<libmutil/mtypes.h>
-//#define DISABLE_OSS
-//#define DISABLE_ALSA
-
-/* Compilation time configuration */
-
-#ifdef _MSC_VER
-
-#define DSOUND
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
+#if defined _MSC_VER || defined __MINGW32__
+# ifndef WIN32
+# define WIN32
+# endif
#endif
-#pragma warning (disable: 4251)
+#ifdef WIN32
+ //In windows, use direct sound for all, except in windows ce (use then Wave in/out)
+# ifdef _WIN32_WCE
+# define WAVE_SOUND
+# else
+# define DSOUND
+# endif
-#ifndef WIN32
-#define WIN32
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0500
+# endif
+
+ //warning message: class member needs to have dll-interface to be used by clients of class 'XXX'
+#ifndef __MINGW32__
+# pragma warning (disable: 4251)
#endif
-#ifndef uint8_t
-typedef unsigned char uint8_t;
-#endif
+# ifdef __MINGW32__
+# define WINVER 0x0500
+# define DSOUND
+# endif // !__MINGW32__
-#ifndef byte_t
-typedef unsigned char byte_t;
+#else
+# define LINUX
#endif
-#ifndef int16_t
-typedef __int16 int16_t;
+//Temporary ... STLPort does not allow addition of errno.h ... but WCEcompat does ...
+//So we don't have to repeat this everytime, include errno.h for all files ...
+// anyway, it is just an int :)
+//Anyway, while compiling for EVC, it will still trigger some warnings ... ignore them, errno exhists for sure.
+#ifdef _WIN32_WCE
+# ifndef _STLP_NATIVE_ERRNO_H_INCLUDED
+# include<wcecompat/errno.h>
+# define _STLP_NATIVE_ERRNO_H_INCLUDED
+# endif
+# include<openssl/err.h>
+#else
+# include <errno.h>
#endif
-#ifndef uint16_t
-typedef unsigned short uint16_t;
+/*
+#ifdef USE_STL
+# undef __NO_ISOCEXT
+ using namespace std;
+ #include<string>
#endif
+*/
-#ifndef int32_t
-typedef __int32 int32_t;
+#ifdef DEBUG_OUTPUT
+# define MSM_DEBUG
+# define MSM_DEBUG_COMMAND
#endif
-#ifndef uint32_t
-typedef unsigned int uint32_t;
-#endif
-#ifndef int64_t
-typedef __int64 int64_t;
+#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__)
+# define TEXT_UI
+//#define DEBUG_OUTPUT
+# include<iostream>
+ using namespace std;
+# pragma message ("USING NAMESPACE STD ... in config.h")
#endif
-#ifndef uint64_t
-typedef unsigned long long uint64_t;
+#ifndef HAVE_UINT
+ typedef unsigned int uint;
#endif
-#else // !_MSC_VER
-#include"compilation_config.h"/* STL replacement */
-#include<stdint.h>
-
-#ifdef __MINGW32__
-# define WINVER 0x0500
-# define DSOUND
-#else // !__MINGW32__
-# define ENABLE_TS
-#endif // !__MINGW32__
-
-#endif // !_MSC_VER
-
-// FIXME!!
-
-#ifndef WIN32
-#define LINUX
-#endif
-
-
-
-#ifdef USE_STL
-#undef __NO_ISOCEXT
-using namespace std;
-#include<string>
-
-#else
-
-#endif
-
-typedef uint8_t byte_t;
-
-
/* big/little endian conversion */
static inline uint16_t U16_AT( void const * _p )
@@ -152,23 +151,8 @@
#endif
-
-#ifdef DEBUG_OUTPUT
-#define MSM_DEBUG
-#define MSM_DEBUG_COMMAND
#endif
-#define SOUND_CARD_FREQ 48000
-#if defined(WIN32) && !defined(__MINGW32__)
-#define TEXT_UI
-//#define DEBUG_OUTPUT
-#include<iostream>
-using namespace std;
-#endif
-#ifndef HAVE_UINT
-typedef unsigned int uint;
-#endif
-#endif
Added: branches/rtcp_ntp/include/minisip_wce_extra_includes.h
===================================================================
--- branches/rtcp_ntp/include/minisip_wce_extra_includes.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/include/minisip_wce_extra_includes.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -0,0 +1,17 @@
+#ifndef _MINISIP_WCE_EXTRA_UNNEEDED_INCLUDES_H
+#define _MINISIP_WCE_EXTRA_UNNEEDED_INCLUDES_H
+
+#ifdef _WIN32_WCE
+
+# include<libmsip/SipDialogConfig.h>
+# include"../soundcard/SoundIO.h"
+# include"../soundcard/AudioMixer.h"
+# include"../sdp/SdpHeaderM.h"
+# include"../sdp/SdpHeaderA.h"
+# include"../minisip/confbackend/ConfBackend.h"
+# include"../sip/SipSoftPhoneConfiguration.h"
+# include"../soundcard/SoundSource.h"
+
+#endif
+
+#endif
Property changes on: branches/rtcp_ntp/include/minisip_wce_extra_includes.h
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: branches/rtcp_ntp/ipsec/Makefile.am
===================================================================
--- branches/rtcp_ntp/ipsec/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/ipsec/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,4 +1,4 @@
-noinst_LIBRARIES = libmsipipsecapi.a
+noinst_LTLIBRARIES = libmsipipsecapi.la
-libmsipipsecapi_a_SOURCES = MsipIpsecAPI.cxx
+libmsipipsecapi_la_SOURCES = MsipIpsecAPI.cxx
noinst_HEADERS = MsipIpsecAPI.h
Modified: branches/rtcp_ntp/mediahandler/AudioMedia.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/AudioMedia.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/AudioMedia.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,7 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include"AudioMedia.h"
+#include"AudioMedia.h"
+
#include"../rtp/RtpHeader.h"
#include"MediaStream.h"
#include"../soundcard/FileSoundSource.h"
@@ -57,6 +58,10 @@
#ifdef AEC_SUPPORT
AEC AudioMedia::aec; //hanning
#endif
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
// pn430 Parameter list changed for multicodec
//AudioMedia::AudioMedia( MRef<SoundIO *> soundIo, MRef<Codec *> codec ):
Modified: branches/rtcp_ntp/mediahandler/AudioMedia.h
===================================================================
--- branches/rtcp_ntp/mediahandler/AudioMedia.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/AudioMedia.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,9 +22,11 @@
#ifndef AUDIO_MEDIA_AND_AUDIOSOURCE_H
#define AUDIO_MEDIA_AND_AUDIOSOURCE_H
+
+#include<config.h>
+#include"Media.h"
-#include"Media.h"
#ifdef AEC_SUPPORT
#include "../aec/aec.h" //hanning
#endif
Modified: branches/rtcp_ntp/mediahandler/DtmfSender.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/DtmfSender.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/DtmfSender.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,12 +20,15 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"DtmfSender.h"
+
#include"Session.h"
#include"MediaStream.h"
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
-
DtmfSender::DtmfSender( MRef<Session *> session ){
this->session = session;
}
Modified: branches/rtcp_ntp/mediahandler/DtmfSender.h
===================================================================
--- branches/rtcp_ntp/mediahandler/DtmfSender.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/DtmfSender.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef DTMFSENDER_H
#define DTMFSENDER_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
Modified: branches/rtcp_ntp/mediahandler/KeyAgreement.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/KeyAgreement.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/KeyAgreement.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -19,11 +19,8 @@
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
* Joachim Orrblad <joachim at orrblad.com>
-*/
+*/
-#include<config.h>
-
-
#include"Session.h"
#include"MediaStream.h"
@@ -36,6 +33,10 @@
#include<libmikey/keyagreement_dh.h>
#include<libmikey/keyagreement_psk.h>
#include<libmikey/MikeyException.h>
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
#define MIKEY_PROTO_SRTP 0
@@ -167,7 +168,7 @@
securityConfig.secured = true;
authenticated = true;
}
- catch( certificate_exception &exc ){
+ catch( certificate_exception & ){
// TODO: Tell the GUI
merr << "Could not open certificate" <<end;
securityConfig.ka_type = KEY_MGMT_METHOD_NULL;
@@ -270,7 +271,7 @@
"Unexpected type of message in INVITE" );
}
}
- catch( certificate_exception & exc ){
+ catch( certificate_exception & ){
// TODO: Tell the GUI
merr << "Could not open certificate" <<end;
securityConfig.ka_type = KEY_MGMT_METHOD_NULL;
@@ -553,7 +554,7 @@
"Unexpected type of message in INVITE" );
}
}
- catch( certificate_exception &exc ){
+ catch( certificate_exception & ){
// TODO: Tell the GUI
merr << "Could not open certificate" <<end;
securityConfig.ka_type = KEY_MGMT_METHOD_NULL;
Modified: branches/rtcp_ntp/mediahandler/Makefile.am
===================================================================
--- branches/rtcp_ntp/mediahandler/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libmediahandler.a
+noinst_LTLIBRARIES = libmediahandler.la
-libmediahandler_a_SOURCES = MediaHandler.cxx \
+libmediahandler_la_SOURCES = MediaHandler.cxx \
Session.cxx \
MediaStream.cxx \
Media.cxx \
Modified: branches/rtcp_ntp/mediahandler/Media.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/Media.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/Media.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#include"Media.h"
+#include"Media.h"
+
#include"../codecs/Codec.h"
#include"../soundcard/SoundIO.h"
#include"../minisip/ipprovider/IpProvider.h"
@@ -39,8 +39,11 @@
#include"../video/mixer/ImageMixer.h"
#endif
#include<libmutil/print_hex.h>
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
-
using namespace std;
Media::Media(){
Modified: branches/rtcp_ntp/mediahandler/Media.h
===================================================================
--- branches/rtcp_ntp/mediahandler/Media.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/Media.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,7 +23,7 @@
#ifndef MEDIA_H
#define MEDIA_H
-#include"config.h"
+#include<config.h>
#include<libmutil/Mutex.h>
@@ -42,8 +42,6 @@
class MediaStreamReceiver;
class SdpHeaderM;
-typedef uint8_t byte_t;
-
/**
* The Media class is a representation of a medium type, namely
* video or audio. It holds a list of the CODEC relevant for
@@ -178,8 +176,8 @@
MRef<CodecState *> Media::createCodecInstance( uint8_t payloadType );
protected:
- Media();
- Media( MRef<Codec *> defaultCodec );
+ Media();
+ Media( MRef<Codec *> defaultCodec );
Media( std::list<MRef<Codec *> > codecList );
Modified: branches/rtcp_ntp/mediahandler/MediaCommandString.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaCommandString.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaCommandString.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,10 +20,6 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-
-
-#include<config.h>
-
#include"MediaCommandString.h"
using namespace std;
Modified: branches/rtcp_ntp/mediahandler/MediaCommandString.h
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaCommandString.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaCommandString.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef MEDIA_COMMAND_STRING_H
#define MEDIA_COMMAND_STRING_H
+
+#include<config.h>
#include<string>
Modified: branches/rtcp_ntp/mediahandler/MediaHandler.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaHandler.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaHandler.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -14,13 +14,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* Copyright (C) 2004, 2005
+/* Copyright (C) 2004, 2005, 2006
*
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
+#include"MediaHandler.h"
+
#include<string.h>
#include"../sdp/SdpPacket.h"
#include<libmikey/keyagreement.h>
@@ -30,7 +31,7 @@
#include"../codecs/Codec.h"
#include"Session.h"
#include"MediaStream.h"
-#include"MediaHandler.h"
+
#include"Media.h"
#include"RtpReceiver.h"
#include"MediaCommandString.h"
@@ -40,6 +41,10 @@
#include"../soundcard/SoundDevice.h"
#include"../codecs/Codec.h"
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
+
#ifdef RTCP_ENABLED
#include "../rtp/rtcp/RtcpSender.h"
#include "../rtp/rtcp/RtcpReceiver.h"
@@ -124,7 +129,7 @@
MRef<Session *> session;
MRef<MediaStreamReceiver *> rStream;
MRef<MediaStreamSender *> sStream;
- MRef<RtpReceiver *> rtpReceiver;
+ MRef<RtpReceiver *> rtpReceiver = NULL;
#ifdef RTCP_ENABLED
MRef<RtcpSender *> rtcpSender;
@@ -168,8 +173,10 @@
session->addMediaStreamReceiver( rStream );
}
- if( (*i)->send ){
-
+ if( (*i)->send ){
+ if( !rtpReceiver ){
+ rtpReceiver = new RtpReceiver( ipProvider );
+ }
#ifdef RTCP_ENABLED
sStream = new MediaStreamSender( *i, rtpReceiver->getSocket());
Modified: branches/rtcp_ntp/mediahandler/MediaHandler.h
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaHandler.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaHandler.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef MEDIA_HANDLER_H
#define MEDIA_HANDLER_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
Modified: branches/rtcp_ntp/mediahandler/MediaStream.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaStream.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaStream.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -21,8 +21,8 @@
* Joachim Orrblad <joachim at orrblad.com>
*/
-#include<config.h>
#include"MediaStream.h"
+
#include<libmikey/MikeyPayloadSP.h>
#include<libmikey/keyagreement.h>
#include"../sdp/SdpHeaderM.h"
@@ -39,6 +39,10 @@
#include<iostream>
#include<vector>
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
+
#ifdef RTCP_ENABLED
#include"../rtp/rtcp/RtcpReportSR.h"
#endif
@@ -99,7 +103,7 @@
string sdpFmtpParam;
// int i;
- uint8_t sdpPayloadType = m->getFormat(formatIndex);
+ uint8_t sdpPayloadType = (uint8_t) m->getFormat( formatIndex );
media->handleMHeader( m );
@@ -507,7 +511,7 @@
if( result && !selectedCodec ){
selectedCodec = media->createCodecInstance(
localPayloadType );
- payloadType = m->getFormat( formatIndex );
+ payloadType = (uint8_t)m->getFormat( formatIndex );
}
#else
if(result){
Modified: branches/rtcp_ntp/mediahandler/MediaStream.h
===================================================================
--- branches/rtcp_ntp/mediahandler/MediaStream.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/MediaStream.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef MEDIA_STREAM_H
#define MEDIA_STREAM_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include"../rtp/CryptoContext.h"
Modified: branches/rtcp_ntp/mediahandler/RtpReceiver.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/RtpReceiver.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/RtpReceiver.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,17 +20,17 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
+#include"RtpReceiver.h"
-#include"RtpReceiver.h"
-#include"MediaStream.h"
-#include"../minisip/ipprovider/IpProvider.h"
+#include<libmnetutil/UDPSocket.h>
#include<libmnetutil/NetworkException.h>
-#include<libmnetutil/UDPSocket.h>
#include<libmutil/Thread.h>
+
#include"../rtp/SRtpPacket.h"
#include"../codecs/Codec.h"
#include<iostream>
+#include"MediaStream.h"
+#include"../minisip/ipprovider/IpProvider.h"
#include<libmutil/itoa.h> //for debug ... remove ... cesc
@@ -69,6 +69,10 @@
#include<errno.h>
#endif
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
+
//Set the range of rtp usable ports ... starting at min and spanning a range, up to max
#define RTP_LOCAL_PORT_RANGE_MIN 30000
#define RTP_LOCAL_PORT_RANGE 5000
@@ -87,10 +91,10 @@
//generate a random port, even number, in the given range
float randPartial = (float)rand() / RAND_MAX;
int port = (int) (RTP_LOCAL_PORT_RANGE * randPartial );
- port = 2 * (int)( port/2 ); //turn this into an even number
+ port = (int) ( 2 * (int)(port/2 ) ); //turn this into an even number
port += RTP_LOCAL_PORT_RANGE_MIN; //add the min port to set it within the range
#ifdef DEBUG_OUTPUT
- printf( "RtpReceiver:: final trying port = %d\n", port );
+ printf( "RtpReceiver:: final trying port = %d\n", port );
#endif
try{
socket = new UDPSocket( port );
@@ -98,7 +102,7 @@
break;
}
}
- catch( NetworkException & exc ){
+ catch( NetworkException & ){
// FIXME: do something nice
// merr << "Minisip could not create a UDP socket!" << end;
// merr << "Check your network settings." << end;
@@ -170,8 +174,8 @@
#endif
RtpReceiver::~RtpReceiver(){
- thread->join();
- delete thread;
+ thread->join();
+ delete thread;
socket->close();
}
@@ -324,7 +328,11 @@
int ret = -1;
FD_ZERO( &rfds );
+ #ifdef WIN32
+ FD_SET( (uint32_t) socket->getFd(), &rfds );
+ #else
FD_SET( socket->getFd(), &rfds );
+ #endif
tv.tv_sec = 0;
tv.tv_usec = 100000;
@@ -332,15 +340,20 @@
while( ret < 0 ){
ret = select( socket->getFd() + 1, &rfds, NULL, NULL, &tv );
if( ret < 0 ){
-#ifdef DEBUG_OUTPUT
- //FIXME: do something better
- cerr << "RtpReceiver::run() - select returned -1" << endl;
-#endif
- if( errno == EINTR ) { continue; }
- else {
- kill = true;
- break;
- }
+ #ifdef DEBUG_OUTPUT
+ //FIXME: do something better
+ cerr << "RtpReceiver::run() - select returned -1" << endl;
+ #endif
+
+ #ifndef _WIN32_WCE
+ if( errno == EINTR ) { continue; }
+ #else
+ if( errno == WSAEINTR ) { continue; }
+ #endif
+ else {
+ kill = true;
+ break;
+ }
}
}
@@ -368,7 +381,7 @@
#endif
}
- catch (NetworkException & exc ) {
+ catch (NetworkException & ) {
continue;
}
Modified: branches/rtcp_ntp/mediahandler/RtpReceiver.h
===================================================================
--- branches/rtcp_ntp/mediahandler/RtpReceiver.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/RtpReceiver.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef RTPRECEIVER_H
#define RTPRECEIVER_H
+
+#include<config.h>
#include<libmutil/Mutex.h>
#include<libmutil/MemObject.h>
Modified: branches/rtcp_ntp/mediahandler/Session.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/Session.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/Session.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -21,8 +21,8 @@
* Joachim Orrblad <joachim at orrblad.com>
*/
-#include<config.h>
#include"Session.h"
+
#include"MediaStream.h"
#include"Media.h"
#include"AudioMedia.h"
@@ -43,6 +43,10 @@
#include<libmutil/dbg.h>
#include<libmutil/itoa.h>
#include<libmutil/Timestamp.h>
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
#define SESSION_LINE "s=Minisip Session"
@@ -282,7 +286,7 @@
}
#endif
- (*iSStream)->setPort( m->getPort() );
+ (*iSStream)->setPort( (uint16_t)m->getPort() );
(*iSStream)->setRemoteAddress( remoteAddress );
}
@@ -636,9 +640,9 @@
it != mediaStreamReceivers.end(); it++ ) {
ret += "\n" + (*it)->getDebugString();
}
- for( std::list< MRef<MediaStreamSender *> >::iterator it = mediaStreamSenders.begin();
- it != mediaStreamSenders.end(); it++ ) {
- ret += "\n" + (*it)->getDebugString();
+ for( std::list< MRef<MediaStreamSender *> >::iterator it2 = mediaStreamSenders.begin();
+ it2 != mediaStreamSenders.end(); it2++ ) {
+ ret += "\n" + (*it2)->getDebugString();
}
return ret;
}
Modified: branches/rtcp_ntp/mediahandler/Session.h
===================================================================
--- branches/rtcp_ntp/mediahandler/Session.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/Session.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef SESSION_H
#define SESSION_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include<libmutil/TimeoutProvider.h>
Modified: branches/rtcp_ntp/mediahandler/SessionRegistry.cxx
===================================================================
--- branches/rtcp_ntp/mediahandler/SessionRegistry.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/SessionRegistry.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,10 +20,14 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"SessionRegistry.h"
+
#include"Session.h"
#include"MediaStream.h"
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
using namespace std;
Modified: branches/rtcp_ntp/mediahandler/SessionRegistry.h
===================================================================
--- branches/rtcp_ntp/mediahandler/SessionRegistry.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/mediahandler/SessionRegistry.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef SESSIONREGISTRY_H
#define SESSIONREGISTRY_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include<libmutil/Mutex.h>
Modified: branches/rtcp_ntp/minisip/Bell.cxx
===================================================================
--- branches/rtcp_ntp/minisip/Bell.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/Bell.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,9 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
+#include"Bell.h"
-#include"Bell.h"
#include<stdlib.h>
#include<stdio.h>
#include<signal.h>
@@ -30,14 +29,13 @@
#include<sys/types.h>
#ifdef _MSC_VER
-
#else
-#include<sys/time.h>
-#include<unistd.h>
+# include<sys/time.h>
+# include<unistd.h>
#endif
#ifdef IPAQ
-#include <sys/ioctl.h>
+# include <sys/ioctl.h>
#endif
#include<fcntl.h>
@@ -45,7 +43,8 @@
#include<iostream>
-using namespace std;
+using namespace std;
+
Bell::Bell(){
running=false;
}
Modified: branches/rtcp_ntp/minisip/ConsoleDebugger.cxx
===================================================================
--- branches/rtcp_ntp/minisip/ConsoleDebugger.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ConsoleDebugger.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -2,6 +2,7 @@
#include"ConsoleDebugger.h"
#include<libmutil/termmanip.h>
+#include<libmutil/merror.h>
//#include<libmutil/Thread.h>
#ifdef SM_DEBUG
@@ -13,16 +14,26 @@
#include"../mediahandler/MediaCommandString.h"
-#include<iostream>
-#include<unistd.h>
+#include<iostream>
+
+#ifdef HAVE_UNISTD_H
+# include<unistd.h>
+#endif
#ifdef HAVE_TERMIOS_H
-#include<termios.h>
+# include<termios.h>
#endif
#ifdef WIN32
-#include<conio.h>
+# include<conio.h>
+# ifdef _WIN32_WCE
+# include<stdio.h>
+# endif
#endif
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
using namespace std;
@@ -73,7 +84,11 @@
char c;
#ifdef _MSC_VER
int n=1;
- c= _getch();
+# ifdef _WIN32_WCE
+ c= getchar();
+# else
+ c= _getch();
+# endif
#else
int n = read(STDIN_FILENO, &c, 1);
#endif
@@ -370,7 +385,7 @@
struct termios termattr;
int ret=tcgetattr(STDIN_FILENO, &termattr);
if (ret < 0) {
- perror("tcgetattr:");
+ merror("tcgetattr:");
return -1;
}
termattr.c_cc[VMIN]=1;
@@ -379,7 +394,7 @@
ret = tcsetattr (STDIN_FILENO, TCSANOW, &termattr);
if (ret < 0) {
- perror("tcsetattr");
+ merror("tcsetattr");
return -1;
}
#endif
Modified: branches/rtcp_ntp/minisip/ConsoleDebugger.h
===================================================================
--- branches/rtcp_ntp/minisip/ConsoleDebugger.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ConsoleDebugger.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,5 +1,7 @@
#ifndef _CONSOLEDEBUGGER_H
-#define _CONSOLEDEBUGGER_H
+#define _CONSOLEDEBUGGER_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include"../sip/SipSoftPhoneConfiguration.h"
Modified: branches/rtcp_ntp/minisip/LocationDetector.cxx
===================================================================
--- branches/rtcp_ntp/minisip/LocationDetector.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/LocationDetector.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,12 +20,16 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include"LocationDetector.h"
+#include"LocationDetector.h"
+
#include<stdio.h>
#include<libmutil/itoa.h>
#include<libmutil/CommandString.h>
#include<libmsip/SipSMCommand.h>
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
LocationDetector::LocationDetector(MRef<SipDialogContainer*> cb):callback(cb){
Modified: branches/rtcp_ntp/minisip/LogEntry.cxx
===================================================================
--- branches/rtcp_ntp/minisip/LogEntry.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/LogEntry.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,10 +20,11 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#include<string>
-#include"LogEntry.h"
+
+#include"LogEntry.h"
+
#include<libmutil/MemObject.h>
+#include<string>
using namespace std;
Modified: branches/rtcp_ntp/minisip/LogEntry.h
===================================================================
--- branches/rtcp_ntp/minisip/LogEntry.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/LogEntry.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,12 +22,12 @@
#ifndef LOG_ENTRY_H
#define LOG_ENTRY_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include<string>
-using namespace std;
-
class LogEntryHandler;
class LogEntry : public MObject{
@@ -36,7 +36,7 @@
virtual std::string getMemObjectType(){return "LogEntry";}
int type;
- string peerSipUri;
+ std::string peerSipUri;
time_t start;
static MRef<LogEntryHandler *> handler;
void handle();
@@ -51,7 +51,7 @@
class LogEntryFailure : public LogEntry {
public:
- string error;
+ std::string error;
};
Modified: branches/rtcp_ntp/minisip/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -39,45 +39,45 @@
-minisip_LDADD +=gui/libminisip_gui.a \
+minisip_LDADD +=gui/libminisip_gui.la \
libminisip.a \
- ../sip/libsip.a
+ ../sip/libsip.la
if IPSEC_SUPPORT
-minisip_LDADD +=../ipsec/libmsipipsecapi.a
+minisip_LDADD +=../ipsec/libmsipipsecapi.la
endif
-minisip_LDADD +=../sdp/libsdp.a \
- contactdb/libcontactdb.a
+minisip_LDADD +=../sdp/libsdp.la \
+ contactdb/libcontactdb.la
if P2T_SUPPORT
-minisip_LDADD +=../p2t/libp2t.a
+minisip_LDADD +=../p2t/libp2t.la
endif
-minisip_LDADD +=../mediahandler/libmediahandler.a \
- ../conf/libconf.a
+minisip_LDADD +=../mediahandler/libmediahandler.la \
+ ../conf/libconf.la
if VIDEO_SUPPORT
-minisip_LDADD += ../video/libvideo.a
+minisip_LDADD += ../video/libvideo.la
AM_LDFLAGS += @X_LIBS@ @X_EXTRA_LIBS@
endif
-minisip_LDADD +=../rtp/librtp.a \
- ../minisip/gui/libminisip_gui.a \
- ../codecs/libcodecs.a \
- ../codecs/ilbc/libcodec_ilbc.a \
- ../codecs/g711/libcodec_g711.a \
- ../soundcard/libsoundcard.a \
- ../spaudio/libspaudio.a \
- ../aec/libaec.a \
- ipprovider/libipprovider.a \
- confbackend/libconfbackend.a \
- ../stun/libstun.a \
+minisip_LDADD +=../rtp/librtp.la \
+ ../minisip/gui/libminisip_gui.la \
+ ../codecs/libcodecs.la \
+ ../codecs/ilbc/libcodec_ilbc.la \
+ ../codecs/g711/libcodec_g711.la \
+ ../soundcard/libsoundcard.la \
+ ../spaudio/libspaudio.la \
+ ../aec/libaec.la \
+ ipprovider/libipprovider.la \
+ confbackend/libconfbackend.la \
+ ../stun/libstun.la \
$(MSIP_LIBS) \
$(MNETUTIL_LIBS) \
$(MIKEY_LIBS) \
Modified: branches/rtcp_ntp/minisip/MessageRouter.cxx
===================================================================
--- branches/rtcp_ntp/minisip/MessageRouter.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/MessageRouter.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -29,10 +29,13 @@
//#include"../conf/ConferenceControl.h"
#include<iostream>
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
using namespace std;
-
MessageRouter::MessageRouter(){
}
@@ -174,10 +177,10 @@
sip->getSipStack()->handleCommand(sipcmd);
}
-string MessageRouter::confcb_doJoin(string user, minilist<ConfMember> *list, string confId){
+string MessageRouter::confcb_doJoin(string user, minilist<ConfMember> *conflist, string confId){
// cerr << "ERROR: INVITE USER UNIMPLEMENTED"<< endl;
//cerr << "MR: from CC -> MR: confcb_confDoInvite"<< endl;
- return sip->confjoin(user, list, confId);
+ return sip->confjoin(user, conflist, confId);
//return "12345";
}
string MessageRouter::confcb_doConnect(string user, string confId){
Modified: branches/rtcp_ntp/minisip/MessageRouter.h
===================================================================
--- branches/rtcp_ntp/minisip/MessageRouter.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/MessageRouter.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef MESSAGE_ROUTER_H
#define MESSAGE_ROUTER_H
+
+#include<config.h>
#include<libmsip/SipCallback.h>
#include<libmutil/minilist.h>
@@ -32,10 +34,9 @@
#include "../conf/ConfCallback.h"
#include"../sip/SipSoftPhoneConfiguration.h"
-#include<config.h>
-
-
-class MessageRouter: public SipCallback, public GuiCallback, public ConfCallback{
+class MessageRouter: public SipCallback,
+ public GuiCallback,
+ public ConfCallback{
public:
MessageRouter();
virtual ~MessageRouter(){}
Modified: branches/rtcp_ntp/minisip/Minisip.cxx
===================================================================
--- branches/rtcp_ntp/minisip/Minisip.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/Minisip.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -141,11 +141,11 @@
LogEntry::handler = NULL;
#else //!TEXT_UI
#ifdef GTK_GUI
+ #ifdef DEBUG_OUTPUT
cerr << "Creating GTK GUI"<< endl;
+ #endif
gui = GtkMainUI::create( argc, argv );
- cerr << "Minisip: gtk 1" << endl;
LogEntry::handler = (GtkMainUI *)*gui;
- cerr << "Minisip: gtk 2" << endl;
#ifdef DEBUG_OUTPUT
consoleDbg = MRef<ConsoleDebugger*>(new ConsoleDebugger(phoneConf));
MRef<Thread *> consoleDbgThread = consoleDbg->start();
@@ -241,7 +241,7 @@
// FIXME: This should be done more often
localIpString = externalContactIP = ipProvider->getExternalIp();
- MRef<UDPSocket*> udpSocket = new UDPSocket( false, phoneConf->inherited->localUdpPort );
+ MRef<UDPSocket*> udpSocket = new UDPSocket( phoneConf->inherited->localUdpPort );
phoneConf->inherited->localUdpPort = ipProvider->getExternalPort( udpSocket );
phoneConf->inherited->localIpString = externalContactIP;
Modified: branches/rtcp_ntp/minisip/Minisip.h
===================================================================
--- branches/rtcp_ntp/minisip/Minisip.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/Minisip.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -2,11 +2,8 @@
#define MINISIP_H
#include<config.h>
-//#include"../conf/ConferenceControl.h"
+
#include<libmutil/MemObject.h>
-//#include<libmutil/Thread.h>
-//#include<libmutil/StateMachine.h>
-//#include"ConsoleDebugger.h"
class MediaHandler;
class Gui;
Modified: branches/rtcp_ntp/minisip/confbackend/ConfBackend.cxx
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/ConfBackend.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/ConfBackend.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,15 +20,15 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-
#include"ConfBackend.h"
+
#ifdef GCONF_SUPPORT
#include"GConfBackend.h"
#endif
#include"MXmlConfBackend.h"
+using namespace std;
MRef<ConfBackend *> ConfBackend::create(){
try{
@@ -39,7 +39,7 @@
#endif
}
- catch( ConfBackendException & exc ){
+ catch( ConfBackendException & ){
return NULL;
}
}
Modified: branches/rtcp_ntp/minisip/confbackend/ConfBackend.h
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/ConfBackend.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/ConfBackend.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef CONF_BACKEND_H
#define CONF_BACKEND_H
+
+#include<config.h>
#include<libmutil/MemObject.h>
#include<libmutil/mtypes.h>
Modified: branches/rtcp_ntp/minisip/confbackend/GConfBackend.cxx
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/GConfBackend.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/GConfBackend.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -32,6 +32,7 @@
#define KEY_ROOT "/apps/minisip/"
#endif
+using namespace std;
GConfBackend::GConfBackend(){
Modified: branches/rtcp_ntp/minisip/confbackend/GConfBackend.h
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/GConfBackend.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/GConfBackend.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,6 +23,8 @@
#ifndef G_CONF_BACKEND_H
#define G_CONF_BACKEND_H
+#include<config.h>
+
#include"ConfBackend.h"
typedef struct _GConfClient GConfClient;
@@ -49,7 +51,7 @@
private:
GConfClient * client;
- void sanitizeKey( string &key );
+ void sanitizeKey( std::string &key );
};
Modified: branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.cxx
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,11 +20,14 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#include"MXmlConfBackend.h"
+#include"MXmlConfBackend.h"
+
#include<libmutil/XMLParser.h>
#include<libmutil/itoa.h>
+
+#include<stdlib.h>
+using namespace std;
MXmlConfBackend::MXmlConfBackend(){
fileName = getDefaultConfigFilename();
@@ -32,7 +35,7 @@
try{
parser = new XMLFileParser( fileName );
}
- catch( XMLFileNotFound &exc ){
+ catch( XMLFileNotFound & ){
// Open a new one
parser = new XMLFileParser( "" );
}
@@ -105,13 +108,16 @@
string MXmlConfBackend::getDefaultConfigFilename(){
- char *home = getenv("HOME");
- string ret;
+ string ret;
+ char *home = NULL;
+#ifndef _WIN32_WCE
+ home = getenv("HOME");
+#endif
if (home==NULL){
merr << "WARNING: Could not determine home directory"<<end;
#ifdef WIN32
- ret = string("c:\\minisip.conf");
+ ret = string("c:\\minisip\\minisip.conf");
#else
ret = string("/.minisip.conf");
#endif
Modified: branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.h
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/MXmlConfBackend.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -21,6 +21,8 @@
*/
+#include<config.h>
+
#include"ConfBackend.h"
class XMLFileParser;
@@ -42,7 +44,7 @@
virtual void commit();
- string getMemObjectType(){return "MXmlConfBackend";}
+ std::string getMemObjectType(){return "MXmlConfBackend";}
private:
std::string getDefaultConfigFilename();
std::string fileName;
Modified: branches/rtcp_ntp/minisip/confbackend/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/confbackend/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/confbackend/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,11 +1,12 @@
-noinst_LIBRARIES = libconfbackend.a
+noinst_LTLIBRARIES = libconfbackend.la
-libconfbackend_a_SOURCES = ConfBackend.cxx \
+libconfbackend_la_SOURCES = ConfBackend.cxx \
MXmlConfBackend.cxx
if GCONF_SUPPORT
AM_CPPFLAGS += @GCONF_CFLAGS@
-libconfbackend_a_SOURCES += GConfBackend.cxx
+libconfbackend_la_SOURCES += GConfBackend.cxx
+libconfbackend_la_LIBADD = $(GCONF_LIBS)
endif
noinst_HEADERS = ConfBackend.h \
Modified: branches/rtcp_ntp/minisip/contactdb/ContactDb.cxx
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/ContactDb.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/ContactDb.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"ContactDb.h"
+
#include"PhoneBook.h"
using namespace std;
Modified: branches/rtcp_ntp/minisip/contactdb/ContactDb.h
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/ContactDb.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/ContactDb.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,8 +27,6 @@
#include<libmutil/MemObject.h>
#include<string>
-using namespace std;
-
class ContactDb;
class PhoneBookPerson;
@@ -41,7 +39,7 @@
public:
ContactEntry();
ContactEntry( std::string uri, std::string desc,
- MRef< PhoneBookPerson * > person = NULL );
+ MRef< PhoneBookPerson * > person = NULL );
~ContactEntry();
@@ -59,9 +57,9 @@
bool isOnline(){return onlineStatus==CONTACT_STATUS_ONLINE;}
bool isOffline(){return onlineStatus==CONTACT_STATUS_OFFLINE;}
void setOnlineStatus(int s){onlineStatus=s;}
- void setOnlineStatusDesc(string s){onlineStatusDesc=s;}
+ void setOnlineStatusDesc( std::string s){onlineStatusDesc=s;}
- uint32_t getPersonIndex(){return personIndex;}
+ uint32_t getPersonIndex(){return personIndex;}
virtual std::string getMemObjectType(){return "ContactEntry";}
private:
@@ -72,7 +70,7 @@
std::string desc;
uint32_t type;
MRef< PhoneBookPerson * > person;
- uint32_t personIndex;
+ uint32_t personIndex;
std::string location;
int onlineStatus;
@@ -85,7 +83,7 @@
public:
ContactDb();
- ContactEntry * lookUp( string uri );
+ ContactEntry * lookUp( std::string uri );
ContactEntry * lookUp( uint32_t id );
void addEntry( ContactEntry * entry );
Modified: branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.cxx
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"MXmlPhoneBookIo.h"
+
#include"PhoneBook.h"
#include"ContactDb.h"
Modified: branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.h
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/MXmlPhoneBookIo.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,26 +27,22 @@
#include"PhoneBook.h"
#include<string>
-using namespace std;
-
/* Uses mutil/XMLParser to read and save a phonebook file */
-
-
class MXmlPhoneBookIo : public PhoneBookIo{
- public:
- MXmlPhoneBookIo( string fileName );
+ public:
+ MXmlPhoneBookIo( std::string fileName );
- virtual void save( MRef< PhoneBook * > book );
- virtual MRef< PhoneBook * > load();
+ virtual void save( MRef< PhoneBook * > book );
+ virtual MRef< PhoneBook * > load();
virtual std::string getMemObjectType(){return "PhoneBookIo";}
virtual std::string getPhoneBookId();
- private:
+ private:
std::string getDefaultPhoneBookString();
void createDefault();
- std::string fileName;
+ std::string fileName;
};
#endif
Modified: branches/rtcp_ntp/minisip/contactdb/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,9 +1,9 @@
-noinst_LIBRARIES = libcontactdb.a
+noinst_LTLIBRARIES = libcontactdb.la
-libcontactdb_a_SOURCES = ContactDb.cxx \
+libcontactdb_la_SOURCES = ContactDb.cxx \
PhoneBook.cxx \
MXmlPhoneBookIo.cxx
-noinst_HEADERS = ContactDb.h \
+noinst_HEADERS = ContactDb.h \
PhoneBook.h \
MXmlPhoneBookIo.h
Modified: branches/rtcp_ntp/minisip/contactdb/PhoneBook.cxx
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/PhoneBook.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/PhoneBook.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,8 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"PhoneBook.h"
+
#include"ContactDb.h"
using namespace std;
Modified: branches/rtcp_ntp/minisip/contactdb/PhoneBook.h
===================================================================
--- branches/rtcp_ntp/minisip/contactdb/PhoneBook.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/contactdb/PhoneBook.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,15 +27,13 @@
#include<libmutil/MemObject.h>
#include<list>
+#include<string>
#include"ContactDb.h"
-
-
class PhoneBookPerson;
class PhoneBookIo;
//class ContactEntry;
-
class PhoneBook : public MObject{
public:
static MRef<PhoneBook *> create( MRef< PhoneBookIo * > io );
Modified: branches/rtcp_ntp/minisip/gui/Gui.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/Gui.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/Gui.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,14 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include"Gui.h"
+#include"Gui.h"
+
+#include"GuiCallback.h"
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
+
Gui::~Gui(){
}
Modified: branches/rtcp_ntp/minisip/gui/Gui.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/Gui.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/Gui.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -24,14 +24,11 @@
#define GUI_H
#include<config.h>
-//#include "../../conf/ConferenceControl.h"
-#include"GuiCallback.h"
#include<libmutil/CommandString.h>
#include<libmutil/Thread.h>
#include"../LogEntry.h"
+#include"GuiCallback.h"
-
-//class SipDialogContainer;
class SipSoftPhoneConfiguration;
class ContactDb;
@@ -39,67 +36,65 @@
public:
virtual ~Gui();
- /**
- * Purpose: Displays an error message to the user. This
- * method must be able to display messages before the GUI
- * is "run" (because of errors when initializing the
- * application). (Error handling method)
- *
- * @param s Message that will be displayed to the
- * user.
- */
+ /**
+ * Purpose: Displays an error message to the user. This
+ * method must be able to display messages before the GUI
+ * is "run" (because of errors when initializing the
+ * application). (Error handling method)
+ *
+ * @param s Message that will be displayed to the
+ * user.
+ */
//virtual void displayErrorMessage(string s)=0;
- /**
- * Purpose: The user interface will probably need a
- * reference to the SipSoftPhone. After the GUI has
- * been created and before it is "run" a pointer to
- * the SipSoftPhone will be set. (Initialization method)
- * @param sipphone Pointer to the SipSoftPhone of the
- * application.
- */
+ /**
+ * Purpose: The user interface will probably need a
+ * reference to the SipSoftPhone. After the GUI has
+ * been created and before it is "run" a pointer to
+ * the SipSoftPhone will be set. (Initialization method)
+ * @param sipphone Pointer to the SipSoftPhone of the
+ * application.
+ */
virtual void setSipSoftPhoneConfiguration(MRef<SipSoftPhoneConfiguration *> sipphoneconfig)=0;
-
+
/**
* Purpose: The user interface may use the application
* contact database to look up names given SIP URIs.
* After the GUI has been created and before it is "run",
* a pointer to the ContactDb will be set.
* (Initialization method)
- * @param contactDb Pointer to the Contact database
- * of the application
- */
+ * @param contactDb Pointer to the Contact database
+ * of the application
+ */
virtual void setContactDb(MRef<ContactDb *> contactDb)=0;
- /**
- * Purpose: The GUI and the rest of the application
- * communicates by passing messages to each other. The
- * handleCommand passes messages TO the gui.
- * @param command Message that is passed to the
- * user interface.
- */
+ /**
+ * Purpose: The GUI and the rest of the application
+ * communicates by passing messages to each other. The
+ * handleCommand passes messages TO the gui.
+ * @param command Message that is passed to the
+ * user interface.
+ */
virtual void handleCommand(CommandString command)=0;
-
- /**
- * Purpose: The GUI and the rest of the application
- * communicates by passing messages to each other. The
- * set_callback method sets the object capable of receiving
- * messages FROM the gui.
- * @param callback Pointer to the object that will
- * receive messages FROM the GUI.
- */
+ /**
+ * Purpose: The GUI and the rest of the application
+ * communicates by passing messages to each other. The
+ * set_callback method sets the object capable of receiving
+ * messages FROM the gui.
+ * @param callback Pointer to the object that will
+ * receive messages FROM the GUI.
+ */
virtual void setCallback(GuiCallback *callback);
-
+
GuiCallback * getCallback();
- // Lesson learned: Doing logging in the GUI is not good
- // since when ever something interesting happend it is
- // likely that the GUI has been shut down.
+ // Lesson learned: Doing logging in the GUI is not good
+ // since when ever something interesting happend it is
+ // likely that the GUI has been shut down.
// virtual void log(int type, string msg){};
-
// virtual void gotPacket(int32_t i)=0;
virtual bool configDialog( MRef<SipSoftPhoneConfiguration *> conf )=0;
Modified: branches/rtcp_ntp/minisip/gui/GuiCallback.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/GuiCallback.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/GuiCallback.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -24,18 +24,20 @@
#define GUICALLBACK_H
#include<config.h>
-#include"../../conf/ConferenceControl.h"
#include<libmutil/CommandString.h>
//TODO: Add "enqueueCommand" functionality to this class, and make "qtgui"
//package move to the callback as much as possible --EE
+
+class ConferenceControl;
class GuiCallback{
public:
+ virtual ~GuiCallback() {}
virtual string guicb_doInvite(string sip_url)=0;
- virtual void guicb_handleCommand(CommandString &)=0;
- virtual void guicb_handleMediaCommand(CommandString &)=0;
+ virtual void guicb_handleCommand(CommandString &)=0;
+ virtual void guicb_handleMediaCommand(CommandString &)=0;
virtual void guicb_handleConfCommand(string &conferencename)=0;
virtual void guicb_handleConfCommand(CommandString &)=0;
// virtual string guicb_confDoInvite(string sip_url)=0;
Modified: branches/rtcp_ntp/minisip/gui/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/gui/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -9,9 +9,9 @@
endif
-noinst_LIBRARIES = libminisip_gui.a
+noinst_LTLIBRARIES = libminisip_gui.la
-libminisip_gui_a_SOURCES = Gui.cxx \
+libminisip_gui_la_SOURCES = Gui.cxx \
GuiCallback.cxx
noinst_HEADERS = Gui.h \
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/CallWidget.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/CallWidget.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/CallWidget.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -66,14 +66,14 @@
};
class CallWidget : public Gtk::VBox
-#ifndef OLDLIBGLADEMM
-,public DtmfHandler
-#endif
+ #ifndef OLDLIBGLADEMM
+ , virtual public DtmfHandler
+ #endif
{
public:
CallWidget( string callId, string remoteUri, MainWindow * mw, bool incoming, std::string secure="unprotected");
- ~CallWidget();
+ virtual ~CallWidget();
void hideAcceptButton();
virtual bool handleCommand( CommandString command );
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/CertificateDialog.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/CertificateDialog.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/CertificateDialog.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -32,8 +32,8 @@
#define MESSAGE_DIALOG_ARG false,Gtk::MESSAGE_WARNING,Gtk::BUTTONS_OK,true
#endif
+using namespace std;
-
CertificateDialog::CertificateDialog( Glib::RefPtr<Gnome::Glade::Xml> refXml ){
// this->refXml = refXml;
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/DtmfWidget.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/DtmfWidget.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/DtmfWidget.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,8 +27,9 @@
class DtmfHandler{
- public:
- virtual void dtmfPressed( uint8_t symbol )=0;
+ public:
+ virtual ~DtmfHandler() {}
+ virtual void dtmfPressed( uint8_t symbol )=0;
};
@@ -36,7 +37,7 @@
public:
DtmfWidget();
- void setHandler( DtmfHandler * handler );
+ void setHandler( DtmfHandler * handler );
private:
void buttonPressed();
@@ -54,7 +55,4 @@
Gtk::Button starButton;
};
-
-
-
#endif
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/ImWidget.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/ImWidget.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/ImWidget.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -26,18 +26,20 @@
#include<config.h>
#include<gtkmm.h>
+#include<string>
+
class ImMessageTextView;
class MainWindow;
class ImWidget : public Gtk::VBox{
public:
- ImWidget( MainWindow * mainWindow, string toUri, string fromUri );
+ ImWidget( MainWindow * mainWindow, std::string toUri, std::string fromUri );
~ImWidget();
- bool handleIm( string message, string from);
- void send( string message );
+ bool handleIm( std::string message, std::string from);
+ void send( std::string message );
- string getToUri(){ return toUri; };
+ std::string getToUri(){ return toUri; };
/**
This function should be called (from MainWindow::onTabChange)
@@ -63,8 +65,8 @@
Gtk::HBox * buttonBox;
Gtk::Button * closeButton;
- string toUri;
- string fromUri;
+ std::string toUri;
+ std::string fromUri;
MainWindow * mainWindow;
/**
@@ -85,10 +87,10 @@
class ImEntry {
public:
- ImEntry( string callId );
+ ImEntry( std::string callId );
private:
- string callId;
+ std::string callId;
Gtk::TextBuffer::iterator startIter;
Gtk::TextBuffer::iterator endIter;
};
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/LogWidget.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/LogWidget.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/LogWidget.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -34,6 +34,8 @@
#define BIND sigc::bind
#endif
+using namespace std;
+
LogWidget::LogWidget( MainWindow * mainWindow ){
this->mainWindow = mainWindow;
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -31,9 +31,11 @@
#include"SettingsDialog.h"
#include"CertificateDialog.h"
#include"DtmfWidget.h"
+
#ifndef WIN32
-#include"TrayIcon.h"
+ #include"TrayIcon.h"
#endif
+
#include"LogWidget.h"
#include"ImWidget.h"
#include"AccountsList.h"
@@ -314,9 +316,13 @@
delete statusWidget;
delete logWidget;
delete phoneMenu;
+
+#ifndef WIN32
if( trayIcon ){
delete trayIcon;
}
+#endif
+
delete phoneBookTree;
delete mainWindowWidget;
}
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/MainWindow.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -49,7 +49,11 @@
class PhoneBookTree;
class SettingsDialog;
class CertificateDialog;
-class MTrayIcon;
+
+#ifndef WIN32
+ class MTrayIcon;
+#endif
+
class LogWidget;
class LogEntry;
class ImWidget;
@@ -58,14 +62,15 @@
class AccountsStatusWidget;
-class MainWindow : public GtkMainUI, public DtmfHandler
-#ifdef OLDLIBGLADEMM
- ,public SigC::Object
-#endif
+class MainWindow : public GtkMainUI,
+ public DtmfHandler
+ #ifdef OLDLIBGLADEMM
+ ,public SigC::Object
+ #endif
{
public:
MainWindow( Gtk::Main *main );
- ~MainWindow();
+ virtual ~MainWindow();
bool isVisible();
void hide();
@@ -200,7 +205,11 @@
SettingsDialog * settingsDialog;
CertificateDialog * certificateDialog;
- MTrayIcon * trayIcon;
+
+ #ifndef WIN32
+ MTrayIcon * trayIcon;
+ #endif
+
LogWidget * logWidget;
AccountsStatusWidget * statusWidget;
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -17,7 +17,6 @@
AccountsList.cxx \
AccountsStatusWidget.cxx \
DtmfWidget.cxx \
- GtkMainUI.h \
GtkMainUI.cxx
noinst_HEADERS = MainWindow.h \
@@ -34,4 +33,5 @@
AccountDialog.h \
AccountsList.h \
AccountsStatusWidget.h \
- DtmfWidget.h
+ DtmfWidget.h \
+ GtkMainUI.h
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/PhoneBook.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/PhoneBook.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/PhoneBook.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -29,6 +29,7 @@
//#include<libmnetutil/TCPSocket.h>
//#include<iostream>
+using namespace std;
PhoneBookTree::PhoneBookTree(){
add( name );
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.cxx
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -35,6 +35,7 @@
#define BIND sigc::bind
#endif
+using namespace std;
SettingsDialog::SettingsDialog( Glib::RefPtr<Gnome::Glade::Xml> refXml,
CertificateDialog * certificateDialog){
Modified: branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.h
===================================================================
--- branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/gui/gtkgui/SettingsDialog.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -28,6 +28,8 @@
#include<libglademm/xml.h>
#include<gtkmm.h>
+#include<string>
+
#include<libmutil/MemObject.h>
#include"AccountsList.h"
@@ -82,7 +84,7 @@
public:
GeneralSettings( Glib::RefPtr<Gnome::Glade::Xml> refXml );
- string apply();
+ std::string apply();
void setConfig( MRef<SipSoftPhoneConfiguration *> config );
void setAccounts( Glib::RefPtr<AccountsList> list );
@@ -117,7 +119,7 @@
MediaSettings( Glib::RefPtr<Gnome::Glade::Xml> refXml );
~MediaSettings();
- string apply();
+ std::string apply();
void setConfig( MRef<SipSoftPhoneConfiguration *> config );
@@ -158,7 +160,7 @@
public:
SecuritySettings( Glib::RefPtr<Gnome::Glade::Xml> refXml );
- string apply();
+ std::string apply();
void setConfig( MRef<SipSoftPhoneConfiguration *> config );
@@ -194,7 +196,7 @@
public:
AdvancedSettings( Glib::RefPtr<Gnome::Glade::Xml> refXml );
- string apply();
+ std::string apply();
void setConfig( MRef<SipSoftPhoneConfiguration *> config );
Modified: branches/rtcp_ntp/minisip/ipprovider/IpProvider.cxx
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/IpProvider.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/IpProvider.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,12 +20,17 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#include"IpProvider.h"
+#include"IpProvider.h"
+
#include"SimpleIpProvider.h"
#include"StunIpProvider.h"
#include"../sip/SipSoftPhoneConfiguration.h"
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
+
+using namespace std;
MRef<IpProvider *> IpProvider::create( MRef<SipSoftPhoneConfiguration *> config ){
MRef<IpProvider *> ret;
Modified: branches/rtcp_ntp/minisip/ipprovider/IpProvider.h
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/IpProvider.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/IpProvider.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,16 +23,12 @@
#ifndef IP_PROVIDER_H
#define IP_PROVIDER_H
-#ifdef _MSC_VER
-#ifndef uint16_t
-typedef unsigned short uint16_t;
-#endif
-#else
-#include<stdint.h>
-#endif
+#include<config.h>
#include<libmutil/MemObject.h>
+#include<string>
+
class UDPSocket;
class SipSoftPhoneConfiguration;
Modified: branches/rtcp_ntp/minisip/ipprovider/Makefile.am
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = libipprovider.a
+noinst_LTLIBRARIES = libipprovider.la
-libipprovider_a_SOURCES = IpProvider.cxx \
+libipprovider_la_SOURCES = IpProvider.cxx \
SimpleIpProvider.cxx \
StunIpProvider.cxx
Modified: branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.cxx
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,18 +20,20 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"SimpleIpProvider.h"
+
#include"../../sip/SipSoftPhoneConfiguration.h"
#include<libmnetutil/NetworkFunctions.h>
#include<libmnetutil/UDPSocket.h>
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
using namespace std;
-
-
SimpleIpProvider::SimpleIpProvider( MRef<SipSoftPhoneConfiguration *> config ){
-
+ unsigned i; //index
vector<string> ifaces = NetworkFunctions::getAllInterfaces();
localIp = config->inherited->localIpString;
@@ -41,7 +43,7 @@
if (localIp.length()>0){
bool ok=false;
- for (unsigned i=0; i<ifaces.size(); i++){
+ for ( i=0; i<ifaces.size(); i++ ){
// cerr << "SimpleIP: checking interface = " << ifaces[i] << endl;
if (localIp==NetworkFunctions::getInterfaceIPStr(ifaces[i]))
ok=true;
@@ -55,37 +57,72 @@
else return;
}
- for (unsigned i=0; i<ifaces.size(); i++){
- string ip = NetworkFunctions::getInterfaceIPStr(ifaces[i]);
- #ifdef DEBUG_OUTPUT
- cerr << "SimpleIPProvider: checking interface = " << ifaces[i] << " with IP=" << ip << endl;
- #endif
- if (ip.length()>0){
- if (ifaces[i]==string("lo")){
- if (localIp.length()<=0)
- localIp = ip;//NetworkFunctions::getInterfaceIPStr(ifaces[i]);
- }else{
- string ipstr = ip;//NetworkFunctions::getInterfaceIPStr(ifaces[i]);
-
- //only update the local ip if it is the first interface with a private
- //ip different from localhost or a public ip
- if ( isInPrivateIpRange( ipstr )){
- if (localIp.length()<=0 || localIp=="127.0.0.1")
- localIp = ipstr;
- }else{
- //use first public ip we find ... overwritting the private one
- if( localIp.length() <= 0 ||
- localIp=="127.0.0.1" ||
- localIp.substr(0,2)=="0." ||
- isInPrivateIpRange( localIp) )
- localIp = ipstr;
+ bool ipFound = false;
+
+ //if a preferred network interface is specified in the config file ...
+ if( config->networkInterfaceName != "") {
+ for (unsigned i=0; i<ifaces.size(); i++){
+ if ( config->networkInterfaceName == ifaces[i] ) {
+ localIp = NetworkFunctions::getInterfaceIPStr(ifaces[i]);
+ ipFound=true;
+ break;
+ }
+ }
+ #ifdef DEBUG_OUTPUT
+ cerr << "SimpleIPProvider: preferred network interface = " << config->networkInterfaceName << endl;
+ if( ipFound ) cerr << "SimpleIPProvider: preferred interface found" << endl;
+ else cerr << "SimpleIPProvider: preferred interface NOT found" << endl;
+ #endif
+ }
+
+ //if ip is not found (either not specified or the adapter is not good ...
+ //use one which we consider apropriate
+ if( ! ipFound ) {
+ //print message telling the user about defining a preferred interface
+ cout << "========================================================================" << endl
+ << "|No network interface defined as preferred in the configuration, or" << endl
+ << "|the one specified could not be found." << endl
+ << "|Minisip will try to find an appropriate one." << endl
+ << "|Minisip highly recommends you to add a preferred one. To do so, choose" << endl
+ << "|from the list below and edit the configuration file, section <network_interface>" << endl;
+ for( i=0; i<ifaces.size(); i++ ){
+ string ip = NetworkFunctions::getInterfaceIPStr(ifaces[i]);
+ cout << "| Network Interface: name = " << ifaces[i] << "; IP=" << ip << endl;
+ }
+ cout << "========================================================================" << endl;
+ for ( i=0; i<ifaces.size(); i++ ){
+ string ip = NetworkFunctions::getInterfaceIPStr(ifaces[i]);
+ #ifdef DEBUG_OUTPUT
+ //cout << "SimpleIPProvider: interface = " << ifaces[i] << "; IP=" << ip << endl;
+ #endif
+ if (ip.length()>0){
+ if (ifaces[i]==string("lo")){ //this interface only exhists in linux ...
+ if (localIp.length()<=0)
+ localIp = ip;
+ }else{
+ string ipstr = ip;
+
+ //only update the local ip if it is the first interface with a private
+ //ip different from localhost or a public ip
+ if ( isInPrivateIpRange( ipstr )){
+ if (localIp.length()<=0 ||
+ localIp == "127.0.0.1" || //this is the lo interface
+ localIp.substr(0,2)=="0." //0.0.0.0 is used by windows ...
+ )
+ localIp = ipstr;
+ }else{
+ //use first public ip we find ... overwritting the private one
+ if( localIp.length() <= 0 ||
+ localIp=="127.0.0.1" ||
+ localIp.substr(0,2)=="0." ||
+ isInPrivateIpRange( localIp) )
+ localIp = ipstr;
+ }
}
}
}
}
- #ifdef DEBUG_OUTPUT
- cerr << "SimpleIPProvider: using localIP = " << localIp << endl;
- #endif
+ cout << "Minisip is using IP = " << localIp << endl;
}
bool SimpleIpProvider::isInPrivateIpRange( string ipstr ) {
@@ -125,5 +162,5 @@
}
uint16_t SimpleIpProvider::getExternalPort( MRef<UDPSocket *> sock ){
- return sock->getPort();
+ return (uint16_t)sock->getPort();
}
Modified: branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.h
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/SimpleIpProvider.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,9 +23,10 @@
#ifndef SIMPLE_IP_PROVIDER
#define SIMPLE_IP_PROVIDER
+#include<config.h>
+
#include"IpProvider.h"
-
class SimpleIpProvider: public IpProvider{
public:
SimpleIpProvider( MRef<SipSoftPhoneConfiguration *> config );
@@ -41,7 +42,7 @@
Helper function ...
@return true if ip is in the private range defined by IETF
*/
- bool isInPrivateIpRange( string ip );
+ bool isInPrivateIpRange( std::string ip );
std::string localIp;
};
Modified: branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.cxx
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,18 +20,21 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-#include"StunIpProvider.h"
+#include"StunIpProvider.h"
+
#include"../../sip/SipSoftPhoneConfiguration.h"
#include<libmnetutil/IPAddress.h>
#include<libmnetutil/UDPSocket.h>
#include<libmnetutil/NetworkFunctions.h>
#include<libmnetutil/NetworkException.h>
#include"../../stun/STUN.h"
+
+#ifdef _WIN32_WCE
+# include"../include/minisip_wce_extra_includes.h"
+#endif
using namespace std;
-
static vector<string> getLocalIPs(){
vector<string> ret;
vector<string> ifaces = NetworkFunctions::getAllInterfaces();
@@ -130,9 +133,9 @@
uint16_t stunPort = phoneConf->stunServerPort;
- UDPSocket sock(false);
+ UDPSocket sock;
- uint16_t localPort = sock.getPort();
+ uint16_t localPort = (uint16_t)sock.getPort();
char mappedip[16];
uint16_t mappedport;
int32_t natType = STUN::getNatType( *stunIp, stunPort,
@@ -179,7 +182,7 @@
if( natType == (unsigned)STUN::STUNTYPE_OPEN_INTERNET ){
/* In that case, don't bother do the STUN query */
- return socket->getPort();
+ return (uint16_t)socket->getPort();
}
STUN::getExternalMapping( *((IP4Address*)stunIp),
Modified: branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.h
===================================================================
--- branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/minisip/ipprovider/StunIpProvider.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,12 +23,13 @@
#ifndef STUN_IP_PROVIDER
#define STUN_IP_PROVIDER
+#include<config.h>
+
#include"IpProvider.h"
class IPAddress;
class Gui;
-
class StunIpProvider: public IpProvider{
public:
static MRef<StunIpProvider *> create( MRef<SipSoftPhoneConfiguration *> config );
Modified: branches/rtcp_ntp/p2t/GroupListClient.cxx
===================================================================
--- branches/rtcp_ntp/p2t/GroupListClient.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/GroupListClient.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,13 +20,12 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-
#include <stdio.h>
#include <errno.h>
#include "GroupListClient.h"
#include <libmutil/dbg.h>
#include <libmutil/itoa.h>
+#include <libmutil/merror.h>
#include <libmutil/XMLParser.h>
#include<ctype.h>
@@ -138,7 +137,7 @@
WSADATA wsaData;
wVersionRequested = MAKEWORD (1, 1);
if (WSAStartup (wVersionRequested, &wsaData) != 0) {
- //perror("Failed to init windows Group List Server sockets");
+ //merror("Failed to init windows Group List Server sockets");
return "ERROR failed to init Windows Group List Server socket";
}
#endif
@@ -146,7 +145,7 @@
/* create socket */
sock = socket( PF_INET, SOCK_STREAM, 0);
if (sock < 0) {
- //perror("Failed to create Group List Server socket");
+ //merror("Failed to create Group List Server socket");
return "ERROR failed to create Group List Server socket";
}
@@ -158,7 +157,7 @@
host_info = gethostbyname( srv_addr);
if (NULL == host_info) {
- //perror("unknown Group List server");
+ //merror("unknown Group List server");
return "ERROR unknown Group List Server";
}
memcpy( (char *)&server.sin_addr, host_info->h_addr, host_info->h_length);
@@ -168,7 +167,7 @@
/* connect to the server */
if ( connect( sock, (struct sockaddr*)&server, sizeof( server)) < 0) {
- //perror("can't connect to GroupList Server");
+ //merror("can't connect to GroupList Server");
return "ERROR can't connect to GroupList Server";
}
Modified: branches/rtcp_ntp/p2t/GroupListServer.cxx
===================================================================
--- branches/rtcp_ntp/p2t/GroupListServer.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/GroupListServer.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,7 +20,7 @@
* Authors: Erik Eliasson <eliasson at it.kth.se>
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
+
#include"GroupListServer.h"
#include <ctype.h>
#include<libmutil/dbg.h>
Modified: branches/rtcp_ntp/p2t/GroupListUserElement.h
===================================================================
--- branches/rtcp_ntp/p2t/GroupListUserElement.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/GroupListUserElement.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,7 +23,8 @@
#ifndef GROUPLISTUSERELEMENT_H
#define GROUPLISTUSERELEMENT_H
-#include<config.h>
+#include<config.h>
+
#include<vector>
#include<libmutil/MemObject.h>
#include"../codecs/Codec.h"
Modified: branches/rtcp_ntp/p2t/Makefile.am
===================================================================
--- branches/rtcp_ntp/p2t/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,5 +1,5 @@
-noinst_LIBRARIES = libp2t.a
-libp2t_a_SOURCES = RtcpAPP.cxx \
+noinst_LTLIBRARIES = libp2t.la
+libp2t_la_SOURCES = RtcpAPP.cxx \
RtcpAPPHeader.cxx \
RtcpTransactionGetFloor.cxx \
RtcpTransactionGrantFloor.cxx \
Modified: branches/rtcp_ntp/p2t/P2T.cxx
===================================================================
--- branches/rtcp_ntp/p2t/P2T.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/P2T.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,7 +20,6 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
#include"P2T.h"
//Performance measurements
Modified: branches/rtcp_ntp/p2t/P2T.h
===================================================================
--- branches/rtcp_ntp/p2t/P2T.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/P2T.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,9 +20,6 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-
-
-
#ifndef P2TDEFINITIONS_H
#define P2TDEFINITIONS_H
Modified: branches/rtcp_ntp/p2t/RtcpAPP.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpAPP.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpAPP.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -20,8 +20,6 @@
* Johan Bilien <jobi at via.ecp.fr>
*/
-#include<config.h>
-
#ifdef LINUX
#include<sys/select.h>
#include<netinet/in.h>
@@ -43,8 +41,10 @@
#include<errno.h>
#include"RtcpAPP.h"
#include"RtcpAPPHeader.h"
+
#include<libmutil/dbg.h>
#include<libmutil/itoa.h>
+#include<libmutil/merror.h>
@@ -135,7 +135,12 @@
fd_set set;
FD_ZERO(&set);
- FD_SET(rtp_socket.getFd(), &set);
+ #ifdef WIN32
+ FD_SET( (uint32_t) rtp_socket.getFd(), &set);
+ #else
+ FD_SET(rtp_socket.getFd(), &set);
+ #endif
+
struct timeval tv;
struct timeval * p_tv;
if( timeout > 0 ){
@@ -155,8 +160,12 @@
return NULL;
}
if (avail<0){
- if (errno!=EINTR){
- perror("Error when using poll:");
+ #ifndef _WIN32_WCE
+ if ( errno != EINTR ){
+ #else
+ if( errno != WSAEINTR ) { continue; }
+ #endif
+ merror("Error when using poll:");
exit(1);
}else{
}
@@ -166,7 +175,7 @@
i = recvfrom(rtp_socket.getFd(), buf, 2048, 0, /*(struct sockaddr *) &from*/NULL, /*(socklen_t *)fromlen*/NULL);
if (i<0){
- perror("recvfrom:");
+ merror("recvfrom:");
return NULL;
}
Modified: branches/rtcp_ntp/p2t/RtcpAPP.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpAPP.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpAPP.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,14 +22,14 @@
#ifndef RTCPAPP_H
#define RTCPAPP_H
+
+#include<config.h>
#include"RtcpAPPHeader.h"
#include<libmnetutil/UDPSocket.h>
#include<libmnetutil/IPAddress.h>
#include"P2T.h"
-#include<config.h>
-
#if BYTE_ORDER == LITTLE_ENDIAN
#else
Modified: branches/rtcp_ntp/p2t/RtcpAPPHeader.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpAPPHeader.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpAPPHeader.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,9 +22,10 @@
#ifndef RTCPAPPHEADER_H
#define RTCPAPPHEADER_H
+
+#include<config.h>
#include<vector>
-#include<config.h>
#include<string>
using namespace std;
Modified: branches/rtcp_ntp/p2t/RtcpReceiver.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpReceiver.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpReceiver.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -76,7 +76,7 @@
RtcpReceiver::RtcpReceiver(MRef<SipSoftPhoneConfiguration*> config, int RTPport){
//open UDPSocket
- rtcp_sock = new UDPSocket(false,++RTPport);
+ rtcp_sock = new UDPSocket(++RTPport);
//set contact ip and port without STUN
contactMediaIP = config->inherited->localIpString;
@@ -302,8 +302,11 @@
fd_set set;
FD_ZERO(&set);
- FD_SET(fd, &set);
-
+ #ifdef WIN32
+ FD_SET( (uint32_t) fd, &set);
+ #else
+ FD_SET(fd, &set);
+ #endif
void *buffer = malloc(16384);
int nread;
Modified: branches/rtcp_ntp/p2t/RtcpSender.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpSender.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpSender.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,7 +22,7 @@
#include"RtcpSender.h"
-#include<config.h>
+
#include<libmsip/SipTransaction.h>
#include<libmsip/SipDialogConfig.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -28,12 +28,6 @@
*
*/
-
-
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-#endif
-
#include<assert.h>
#include"RtcpTransactionGetFloor.h"
#include"P2T.h"
@@ -433,7 +427,7 @@
seqNo(seqNo),
remoteSSRC(remoteSSRC)
{
- this->toaddr = toaddr;
+ //this->toaddr = toaddr;
this->port = port;
counter=1;
Modified: branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionGetFloor.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,12 @@
#ifndef RTCPTRANSACTIONGETFLOOR_H
#define RTCPTRANSACTIONGETFLOOR_H
+
+#include<config.h>
+
+#ifdef _WIN32_WCE
+# include<libmnetutil/IPAddress.h>
+#endif
#include<libmsip/SipSMCommand.h>
#include<libmsip/SipTransaction.h>
@@ -199,7 +205,7 @@
* Control Messages.
* @return <CODE>IPAdress</CODE> object.
*/
- IPAddress *getAddr(){return toaddr;}
+ IPAddress *getAddr(){ return NULL; //was (the field does not exhist anymore in siptransaction): toaddr;}
/**
* returns the destination port for the Floor Control
Modified: branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,14 +27,11 @@
* Purpose
*
*/
+
+#include"RtcpTransactionGrantFloor.h"
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-#endif
-
-
#include<assert.h>
-#include"RtcpTransactionGrantFloor.h"
+
#include"P2T.h"
#include<libmsip/SipTransactionUtils.h>
#include<libmsip/SipDialogContainer.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionGrantFloor.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,6 +22,8 @@
#ifndef RTCPTRANSACTIONGRANTFLOOR_H
#define RTCPTRANSACTIONGRANTFLOOR_H
+
+#include<config.h>
#include<libmsip/SipSMCommand.h>
#include<libmsip/SipTransaction.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -28,14 +28,10 @@
*
*/
-
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-#endif
-
-
+#include"RtcpTransactionIdleFloor.h"
+
#include<assert.h>
-#include"RtcpTransactionIdleFloor.h"
+
#include"P2T.h"
#include<libmsip/SipTransactionUtils.h>
#include<libmsip/SipDialogContainer.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionIdleFloor.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -23,12 +23,12 @@
#ifndef RTCPTRANSACTIONIDLEFLOOR_H
#define RTCPTRANSACTIONIDLEFLOOR_H
+#include<config.h>
+
#include<libmsip/SipSMCommand.h>
#include<libmsip/SipTransaction.h>
#include"SipDialogP2T.h"
-//#include<config.h>
-
/**
* implements the Floor Release Procedure if a remote user releases the floor..
* <p><b>Floor Release Procedure:</b><br>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -27,14 +27,11 @@
* Purpose
*
*/
+
+#include"RtcpTransactionReleaseFloor.h"
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-#endif
-
-
#include<assert.h>
-#include"RtcpTransactionReleaseFloor.h"
+
#include"P2T.h"
#include<libmsip/SipTransactionUtils.h>
#include<libmsip/SipDialogContainer.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionReleaseFloor.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -32,14 +32,13 @@
#ifndef RTCPTRANSACTIONRELEASEFLOOR_H
#define RTCPTRANSACTIONRELEASEFLOOR_H
+
+#include<config.h>
-
#include<libmsip/SipSMCommand.h>
#include<libmsip/SipTransaction.h>
#include"SipDialogP2T.h"
-//#include<config.h>
-
/**
* implements the Floor Release Procedure if the local user releases the floor.
* <p><b>Floor Release Procedure:</b><br>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.cxx
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -21,13 +21,9 @@
*/
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-#endif
-
-
+#include"RtcpTransactionTakenFloor.h"
+
#include<assert.h>
-#include"RtcpTransactionTakenFloor.h"
#include"P2T.h"
#include<libmsip/SipTransactionUtils.h>
#include<libmsip/SipDialogContainer.h>
Modified: branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.h
===================================================================
--- branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/p2t/RtcpTransactionTakenFloor.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -22,13 +22,13 @@
#ifndef RtcpTransactionTakenFloor_H
#define RtcpTransactionTakenFloor_H
+
+#include<config.h>
#include<libmsip/SipSMCommand.h>
#include<libmsip/SipTransaction.h>
#include"SipDialogP2T.h"
-//#include<config.h>
-
/**
* sends a Floor TAKEN message to a remote user.
* <p><b>RtcpTransactionTakenFloor</b><br>
Modified: branches/rtcp_ntp/rtp/CryptoContext.cxx
===================================================================
--- branches/rtcp_ntp/rtp/CryptoContext.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/rtp/CryptoContext.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -153,7 +153,7 @@
}
for(i = 8; i < 14; i++ ){
- iv[i] = ( 0xFF & ( index >> ((13-i)*8) ) ) ^ k_s[i];
+ iv[i] = ( 0xFF & (unsigned char)( index >> ((13-i)*8) ) ) ^ k_s[i];
}
iv[14] = iv[15] = 0;
@@ -231,7 +231,7 @@
}
for(i = 7; i < 14 ; i++ ){
- iv[i] = (0xFF & (key_id >> (8*(13-i)))) ^
+ iv[i] = (unsigned char)(0xFF & (key_id >> (8*(13-i)))) ^
master_salt[i];
}
Modified: branches/rtcp_ntp/rtp/Makefile.am
===================================================================
--- branches/rtcp_ntp/rtp/Makefile.am 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/rtp/Makefile.am 2006-12-06 23:06:42 UTC (rev 2998)
@@ -1,6 +1,6 @@
-noinst_LIBRARIES = librtp.a
+noinst_LTLIBRARIES = librtp.la
-librtp_a_SOURCES = RtpHeader.cxx \
+librtp_la_SOURCES = RtpHeader.cxx \
RtpPacket.cxx \
CryptoContext.cxx \
SRtpPacket.cxx \
Modified: branches/rtcp_ntp/rtp/RtcpPacket.h
===================================================================
--- branches/rtcp_ntp/rtp/RtcpPacket.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/rtp/RtcpPacket.h 2006-12-06 23:06:42 UTC (rev 2998)
@@ -31,20 +31,20 @@
#include<libmnetutil/UDPSocket.h>
#include<libmnetutil/IPAddress.h>
+#include<vector>
+
#define RTCP_TYPE_SR 0
#define RTCP_TYPE_RR 1
#define RTCP_TYPE_SDES 2
#define RTCP_TYPE_BYE 3
#define RTCP_TYPE_APP 4
-using namespace std;
-
class RtcpPacket: public MObject{
public:
RtcpPacket();
RtcpPacket(void *buildfrom, int length);
virtual ~RtcpPacket();
- vector<RtcpReport *> &get_reports();
+ std::vector<RtcpReport *> &get_reports();
void add_report(RtcpReport *report);
#ifdef DEBUG_OUTPUT
@@ -52,7 +52,7 @@
#endif
int get_type();
private:
- vector<RtcpReport *> reports;
+ std::vector<RtcpReport *> reports;
int type;
};
Modified: branches/rtcp_ntp/rtp/RtcpReportSDES.cxx
===================================================================
--- branches/rtcp_ntp/rtp/RtcpReportSDES.cxx 2006-12-06 22:21:16 UTC (rev 2997)
+++ branches/rtcp_ntp/rtp/RtcpReportSDES.cxx 2006-12-06 23:06:42 UTC (rev 2998)
@@ -35,7 +35,7 @@
parse_header(buildfrom,max_length);
cerr << "Found SR report with content length of "<< length << " and will try to parse "<< rc_sc<< " chunks" << endl;
- massert(packet_type=PACKET_TYPE_SDES);
+ massert(packet_type==PACKET_TYPE_SDES);
max_length=length*4;
int i=4;
Modified: branches/rtcp_ntp/rtp/RtpHeader.h
===================================================================
--- branches/rtcp_ntp/rtp/RtpHeader.h 2006-12-06 22:21:16 UTC (rev 2997)
+++ branch