From 38a33131233103907bc4e7f9cf4437505cd2d1a5 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Tue, 25 Mar 2008 11:03:17 -0400 Subject: [PATCH] Remove libboost-dev dependency!! --- configure.ac | 3 --- src/audio/audiolayer.h | 1 - src/managerimpl.cpp | 20 ++++++++++---------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 335e09fa09..c81a9ab44b 100644 --- a/configure.ac +++ b/configure.ac @@ -188,9 +188,6 @@ PKG_CHECK_MODULES(libdbuscpp, dbus-c++-1 >= ${LIBDBUSCPP_MIN_VERSION}) SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libdbuscpp_CFLAGS" SFLPHONE_LIBS="$SFLPHONE_LIBS $libdbuscpp_LIBS" -# check for libboost (doesn't use pkg-config) -AC_CHECK_HEADER(boost/tokenizer.hpp, , AC_MSG_ERROR("Unable to find the libboost tokenizer headers; you may need to install the libboost-dev package" ) ) - # check for libgsm1 (doesn't use pkg-config) dnl Check for libgsm AC_ARG_WITH([gsm], diff --git a/src/audio/audiolayer.h b/src/audio/audiolayer.h index 471e85e2b3..bcb54c88bc 100644 --- a/src/audio/audiolayer.h +++ b/src/audio/audiolayer.h @@ -24,7 +24,6 @@ #define _AUDIO_LAYER_H #include <cc++/thread.h> // for ost::Mutex -#include <boost/tokenizer.hpp> #include "../global.h" #include "audiodevice.h" diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 9d0c97d45d..bff84f1af3 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -35,8 +35,6 @@ #include <ccrtp/rtp.h> // why do I need this here? #include <cc++/file.h> -#include <boost/tokenizer.hpp> - #include "manager.h" #include "account.h" #include "audio/audiolayer.h" @@ -1118,19 +1116,21 @@ ManagerImpl::initAudioCodec (void) } } - std::vector<std::string> +std::vector<std::string> ManagerImpl::retrieveActiveCodecs() { - std::vector<std::string> order; - std::string list; + std::vector<std::string> order; + std::string temp; std::string s = getConfigString(AUDIO, "ActiveCodecs"); - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> slash("/"); - tokenizer tokens(s, slash); - for(tokenizer::iterator tok_iter = tokens.begin(); tok_iter!= tokens.end(); ++tok_iter) + + while (s.find("/", 0) != std::string::npos) { - order.push_back(*tok_iter); + size_t pos = s.find("/", 0); + temp = s.substr(0, pos); + s.erase(0, pos + 1); + order.push_back(temp); } + return order; } -- GitLab