summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/sms/services')
-rw-r--r--kopete/protocols/sms/services/CMakeLists.txt8
-rw-r--r--kopete/protocols/sms/services/ConfigureChecks.cmake30
-rw-r--r--kopete/protocols/sms/services/config.h.cmake1
-rw-r--r--kopete/protocols/sms/services/gsmlib.cpp3
-rw-r--r--kopete/protocols/sms/services/gsmlib.h2
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.cpp17
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.h16
-rw-r--r--kopete/protocols/sms/services/smssendprovider.cpp2
8 files changed, 18 insertions, 61 deletions
diff --git a/kopete/protocols/sms/services/CMakeLists.txt b/kopete/protocols/sms/services/CMakeLists.txt
index c9942bd6..2be778ad 100644
--- a/kopete/protocols/sms/services/CMakeLists.txt
+++ b/kopete/protocols/sms/services/CMakeLists.txt
@@ -11,22 +11,24 @@
# FIXME KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-include( ConfigureChecks.cmake )
-
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/kopete/libkopete
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
+if( WITH_GSM )
+ set( GSM_SOURCES gsmlib.cpp gsmlibprefs.ui kopete_unix_serial.cpp )
+endif( )
##### kopetesmsservices (static) ################
tde_add_library( kopetesmsservices STATIC_PIC AUTOMOC
SOURCES
smssend.cpp smssendprefs.ui smssendprovider.cpp smsclient.cpp
- smsclientprefs.ui gsmlib.cpp gsmlibprefs.ui kopete_unix_serial.cpp
+ smsclientprefs.ui ${GSM_SOURCES}
LINK ${GSM_LIBRARY}
)
diff --git a/kopete/protocols/sms/services/ConfigureChecks.cmake b/kopete/protocols/sms/services/ConfigureChecks.cmake
deleted file mode 100644
index 4ed454b4..00000000
--- a/kopete/protocols/sms/services/ConfigureChecks.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-#################################################
-#
-# (C) 2010-2011 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-if( WITH_GSM )
-
- tde_save( CMAKE_REQUIRED_INCLUDES )
- set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
- check_include_file_cxx( gsmlib/gsm_util.h HAVE_GSMLIB_GSM_UTIL_H )
- tde_restore( CMAKE_REQUIRED_INCLUDES )
-
- if( HAVE_GSMLIB_GSM_UTIL_H )
- set( INCLUDE_SMSGSM 1 )
- find_library( GSM_LIBRARY gsmme )
- endif( )
-
- if( NOT (HAVE_GSMLIB_GSM_UTIL_H AND GSM_LIBRARY) )
- tde_message_fatal( "gsmlib is required, but was not found on your system" )
- endif( )
-
-endif( )
-
-configure_file( config.h.cmake config.h @ONLY )
diff --git a/kopete/protocols/sms/services/config.h.cmake b/kopete/protocols/sms/services/config.h.cmake
deleted file mode 100644
index 9555d535..00000000
--- a/kopete/protocols/sms/services/config.h.cmake
+++ /dev/null
@@ -1 +0,0 @@
-#cmakedefine INCLUDE_SMSGSM 1
diff --git a/kopete/protocols/sms/services/gsmlib.cpp b/kopete/protocols/sms/services/gsmlib.cpp
index d1d1e695..f8dcc1e3 100644
--- a/kopete/protocols/sms/services/gsmlib.cpp
+++ b/kopete/protocols/sms/services/gsmlib.cpp
@@ -13,7 +13,6 @@
*************************************************************************
*/
#include "config.h"
-#ifdef INCLUDE_SMSGSM
#include <tqcombobox.h>
#include <tqlayout.h>
@@ -449,5 +448,3 @@ const TQString& GSMLib::description()
}
#include "gsmlib.moc"
-
-#endif
diff --git a/kopete/protocols/sms/services/gsmlib.h b/kopete/protocols/sms/services/gsmlib.h
index aa1bea5f..608c1f4c 100644
--- a/kopete/protocols/sms/services/gsmlib.h
+++ b/kopete/protocols/sms/services/gsmlib.h
@@ -17,7 +17,6 @@
#define GSMLIB_H_039562406
#include "config.h"
-#ifdef INCLUDE_SMSGSM
#include <unistd.h>
@@ -148,5 +147,4 @@ protected:
TQMutex m_outMessagesMutex;
};
-#endif
#endif //GSMLIB_H_039562406
diff --git a/kopete/protocols/sms/services/kopete_unix_serial.cpp b/kopete/protocols/sms/services/kopete_unix_serial.cpp
index fc532ffd..84dfd839 100644
--- a/kopete/protocols/sms/services/kopete_unix_serial.cpp
+++ b/kopete/protocols/sms/services/kopete_unix_serial.cpp
@@ -11,7 +11,6 @@
// * Created: 10.5.1999
// *************************************************************************
#include "config.h"
-#ifdef INCLUDE_SMSGSM
#include <gsmlib/gsm_util.h>
#include <termios.h>
@@ -88,7 +87,7 @@ static void stopTimer()
// KopeteUnixSerialPort members
-void KopeteUnixSerialPort::throwModemException(string message) throw(GsmException)
+void KopeteUnixSerialPort::throwModemException(string message)
{
ostringstream os;
os << message << " (errno: " << errno << "/" << strerror(errno) << ")";
@@ -101,7 +100,7 @@ void KopeteUnixSerialPort::putBack(unsigned char c)
_oldChar = c;
}
-int KopeteUnixSerialPort::readByte() throw(GsmException)
+int KopeteUnixSerialPort::readByte()
{
if (_oldChar != -1)
{
@@ -166,8 +165,7 @@ int KopeteUnixSerialPort::readByte() throw(GsmException)
}
KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed,
- string initString, bool swHandshake)
- throw(GsmException) :
+ string initString, bool swHandshake) :
_oldChar(-1), _timeoutVal(TIMEOUT_SECS)
{
_readNotifier = NULL;
@@ -326,7 +324,7 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed,
throwModemException("reset modem failed");
}
-string KopeteUnixSerialPort::getLine() throw(GsmException)
+string KopeteUnixSerialPort::getLine()
{
string result;
int c;
@@ -349,8 +347,7 @@ string KopeteUnixSerialPort::getLine() throw(GsmException)
return result;
}
-void KopeteUnixSerialPort::putLine(string line,
- bool carriageReturn) throw(GsmException)
+void KopeteUnixSerialPort::putLine(string line, bool carriageReturn)
{
#ifndef NDEBUG
if (debugLevel() >= 1)
@@ -418,7 +415,7 @@ void KopeteUnixSerialPort::putLine(string line,
// in order to properly handle unsolicited result codes from the ME/TA
}
-bool KopeteUnixSerialPort::wait(GsmTime timeout) throw(GsmException)
+bool KopeteUnixSerialPort::wait(GsmTime timeout)
{
fd_set fds;
FD_ZERO(&fds);
@@ -441,5 +438,3 @@ KopeteUnixSerialPort::~KopeteUnixSerialPort()
}
#include "kopete_unix_serial.moc"
-
-#endif
diff --git a/kopete/protocols/sms/services/kopete_unix_serial.h b/kopete/protocols/sms/services/kopete_unix_serial.h
index fd8ed74c..9da7a9ce 100644
--- a/kopete/protocols/sms/services/kopete_unix_serial.h
+++ b/kopete/protocols/sms/services/kopete_unix_serial.h
@@ -15,7 +15,6 @@
#define GSM_UNIX_SERIAL_KOPETE_H
#include "config.h"
-#ifdef INCLUDE_SMSGSM
#include <string>
#include <gsmlib/gsm_error.h>
@@ -43,23 +42,21 @@ protected:
TQSocketNotifier* _readNotifier;
// throw GsmException include UNIX errno
- void throwModemException(std::string message) throw(GsmException);
+ void throwModemException(std::string message);
public:
// create Port given the UNIX device name
KopeteUnixSerialPort(std::string device, speed_t lineSpeed = DEFAULT_BAUD_RATE,
std::string initString = DEFAULT_INIT_STRING,
- bool swHandshake = false)
- throw(GsmException);
+ bool swHandshake = false);
virtual ~KopeteUnixSerialPort();
// inherited from Port
void putBack(unsigned char c);
- int readByte() throw(GsmException);
- std::string getLine() throw(GsmException);
- void putLine(std::string line,
- bool carriageReturn = true) throw(GsmException);
- bool wait(GsmTime timeout) throw(GsmException);
+ int readByte();
+ std::string getLine();
+ void putLine(std::string line, bool carriageReturn = true);
+ bool wait(GsmTime timeout);
void setTimeOut(unsigned int timeout);
signals:
@@ -67,5 +64,4 @@ signals:
};
}
-#endif
#endif // GSM_UNIX_SERIAL_KOPETE_H
diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp
index c403dd42..38dddb5f 100644
--- a/kopete/protocols/sms/services/smssendprovider.cpp
+++ b/kopete/protocols/sms/services/smssendprovider.cpp
@@ -150,7 +150,7 @@ void SMSSendProvider::setAccount(Kopete::Account *account)
const TQString& SMSSendProvider::name(int i)
{
if ( telPos == i || messagePos == i)
- return TQString();
+ return TQString::null;
else
return names[i];
}