[33659] trunk/dports/net/psi
rowue at macports.org
rowue at macports.org
Sat Feb 2 09:02:12 PST 2008
Revision: 33659
http://trac.macosforge.org/projects/macports/changeset/33659
Author: rowue at macports.org
Date: 2008-02-02 09:02:01 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
Added patch files (blushing) and changed filename conventions
Modified Paths:
--------------
trunk/dports/net/psi/Portfile
Added Paths:
-----------
trunk/dports/net/psi/files/
trunk/dports/net/psi/files/patch-configure.diff
trunk/dports/net/psi/files/patch-src_about.ui.diff
trunk/dports/net/psi/files/patch-src_pluginmanager.cpp.diff
trunk/dports/net/psi/files/patch-src_pluginmanager.h.diff
trunk/dports/net/psi/files/patch-src_psiaccount.cpp.diff
trunk/dports/net/psi/files/patch-src_psiplugin.h.diff
Modified: trunk/dports/net/psi/Portfile
===================================================================
--- trunk/dports/net/psi/Portfile 2008-02-02 16:53:26 UTC (rev 33658)
+++ trunk/dports/net/psi/Portfile 2008-02-02 17:02:01 UTC (rev 33659)
@@ -1,6 +1,7 @@
# $Id$
PortSystem 1.0
+
name psi
version 0.11
revision 1
@@ -48,12 +49,12 @@
variant plugins description {Build with experimental Plugin Support} {
-patchfiles-append patch-src_about.ui \
- patch-src_psiaccount.cpp \
- patch-src_pluginmanager.cpp \
- patch-src_psiplugin.h \
- patch-src_pluginmanager.h \
- patch-configure
+patchfiles-append patch-src_about.ui.diff \
+ patch-src_psiaccount.cpp.diff \
+ patch-src_pluginmanager.cpp.diff \
+ patch-src_psiplugin.h.diff \
+ patch-src_pluginmanager.h.diff \
+ patch-configure.diff
configure.args-append --enable-plugins
}
Added: trunk/dports/net/psi/files/patch-configure.diff
===================================================================
--- trunk/dports/net/psi/files/patch-configure.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-configure.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,905 @@
+--- configure 2007-10-14 16:00:49.000000000 +0200
++++ configure 2008-02-02 17:37:18.000000000 +0100
+@@ -22,24 +22,48 @@
+ (bundled QCA only)
+
+ Dependency options:
+- --disable-bundled-qca Disable use of Use bundled QCA
+- --disable-openssl Disable use of OpenSSL (bundled QCA only)
+- --with-openssl-inc=[path] Path to OpenSSL include files (bundled QCA
+- only)
+- --with-openssl-lib=[path] Path to OpenSSL library files (bundled QCA
+- only)
+- --with-zlib-inc=[path] Path to zlib include files
+- --with-zlib-lib=[path] Path to zlib library files
+- --enable-universal Enable use of Mac OS X universal binary support
+- --disable-growl Disable use of Growl
+- --with-growl=[path] Path to the Growl framework
+- --disable-xss Disable use of the XScreenSaver extension
+- --disable-dnotify Disable use of Linux Directory Notification
+- --disable-ghbnr Disable use of gethostbyname_r()
+- --disable-aspell Disable use of ASPELL
+- --with-aspell-inc=[path] Path to Aspell include files
+- --with-aspell-lib=[path] Path to Aspell library files
+- --enable-debug Enable debugging support
++ --disable-bundled-qca Disable use of Use bundled QCA
++ --disable-openssl Disable use of OpenSSL (bundled QCA only)
++ --with-openssl-inc=[path] Path to OpenSSL include files (bundled QCA
++ only)
++ --with-openssl-lib=[path] Path to OpenSSL library files (bundled QCA
++ only)
++ --with-zlib-inc=[path] Path to zlib include files
++ --with-zlib-lib=[path] Path to zlib library files
++ --enable-universal Enable use of Mac OS X universal binary
++ support
++ --disable-growl Disable use of Growl
++ --with-growl=[path] Path to the Growl framework
++ --disable-xss Disable use of the XScreenSaver extension
++ --disable-aspell Disable use of ASPELL
++ --with-aspell-inc=[path] Path to Aspell include files
++ --with-aspell-lib=[path] Path to Aspell library files
++ --disable-dnotify Disable use of Linux Directory Notification
++ --disable-ghbnr Disable use of gethostbyname_r()
++ --disable-google_ft Disable use of Google File Transfer
++ --enable-google-ft Enable Google File Transfer support
++ --with-expat-inc=[path] Path to Expat include files (for Google)
++ --with-expat-lib=[path] Path to Expat library files (for Google)
++ --disable-jingle Disable use of Jingle
++ --enable-jingle Enable Jingle support
++ --with-expat-inc=[path] Path to Expat include files (for Jingle)
++ --with-expat-lib=[path] Path to Expat library files (for Jingle)
++ --with-speex-inc=[path] Path to Speex include files (for Jingle)
++ --with-speex-lib=[path] Path to Speex library files (for Jingle)
++ --with-ilbc-inc=[path] Path to iLBC include files (for Jingle)
++ --with-ilbc-lib=[path] Path to iLBC library files (for Jingle)
++ --with-ortp-inc=[path] Path to ORTP include files (for Jingle)
++ --with-ortp-lib=[path] Path to ORTP library files (for Jingle)
++ --with-alsa-inc=[path] Path to Alsa include files (for Jingle)
++ --with-alsa-lib=[path] Path to Alsa library files (for Jingle)
++ --with-portaudio-inc=[path] Path to PortAudio include files (for Jingle)
++ --with-portaudio-lib=[path] Path to PortAudio library files (for Jingle)
++ --with-glib-inc=[path] Path to GLib include files (for Jingle)
++ --with-glib-lib=[path] Path to GLib library files (for Jingle)
++ --with-glibconfig-inc=[path] Path to glibconfig include file (for Jingle)
++ --disable-plugins Disable use of Plugins
++ --enable-plugins Enable Psi Plugin support
++ --enable-debug Enable debugging support
+
+ EOT
+ }
+@@ -211,6 +235,21 @@
+ shift
+ ;;
+
++ --disable-aspell)
++ QC_DISABLE_aspell="Y"
++ shift
++ ;;
++
++ --with-aspell-inc=*)
++ QC_WITH_ASPELL_INC=$optarg
++ shift
++ ;;
++
++ --with-aspell-lib=*)
++ QC_WITH_ASPELL_LIB=$optarg
++ shift
++ ;;
++
+ --disable-dnotify)
+ QC_DISABLE_dnotify="Y"
+ shift
+@@ -221,18 +260,118 @@
+ shift
+ ;;
+
+- --disable-aspell)
+- QC_DISABLE_aspell="Y"
++ --disable-google_ft)
++ QC_DISABLE_google_ft="Y"
+ shift
+ ;;
+
+- --with-aspell-inc=*)
+- QC_WITH_ASPELL_INC=$optarg
++ --enable-google-ft)
++ QC_ENABLE_GOOGLE_FT="Y"
+ shift
+ ;;
+
+- --with-aspell-lib=*)
+- QC_WITH_ASPELL_LIB=$optarg
++ --with-expat-inc=*)
++ QC_WITH_EXPAT_INC=$optarg
++ shift
++ ;;
++
++ --with-expat-lib=*)
++ QC_WITH_EXPAT_LIB=$optarg
++ shift
++ ;;
++
++ --disable-jingle)
++ QC_DISABLE_jingle="Y"
++ shift
++ ;;
++
++ --enable-jingle)
++ QC_ENABLE_JINGLE="Y"
++ shift
++ ;;
++
++ --with-expat-inc=*)
++ QC_WITH_EXPAT_INC=$optarg
++ shift
++ ;;
++
++ --with-expat-lib=*)
++ QC_WITH_EXPAT_LIB=$optarg
++ shift
++ ;;
++
++ --with-speex-inc=*)
++ QC_WITH_SPEEX_INC=$optarg
++ shift
++ ;;
++
++ --with-speex-lib=*)
++ QC_WITH_SPEEX_LIB=$optarg
++ shift
++ ;;
++
++ --with-ilbc-inc=*)
++ QC_WITH_ILBC_INC=$optarg
++ shift
++ ;;
++
++ --with-ilbc-lib=*)
++ QC_WITH_ILBC_LIB=$optarg
++ shift
++ ;;
++
++ --with-ortp-inc=*)
++ QC_WITH_ORTP_INC=$optarg
++ shift
++ ;;
++
++ --with-ortp-lib=*)
++ QC_WITH_ORTP_LIB=$optarg
++ shift
++ ;;
++
++ --with-alsa-inc=*)
++ QC_WITH_ALSA_INC=$optarg
++ shift
++ ;;
++
++ --with-alsa-lib=*)
++ QC_WITH_ALSA_LIB=$optarg
++ shift
++ ;;
++
++ --with-portaudio-inc=*)
++ QC_WITH_PORTAUDIO_INC=$optarg
++ shift
++ ;;
++
++ --with-portaudio-lib=*)
++ QC_WITH_PORTAUDIO_LIB=$optarg
++ shift
++ ;;
++
++ --with-glib-inc=*)
++ QC_WITH_GLIB_INC=$optarg
++ shift
++ ;;
++
++ --with-glib-lib=*)
++ QC_WITH_GLIB_LIB=$optarg
++ shift
++ ;;
++
++ --with-glibconfig-inc=*)
++ QC_WITH_GLIBCONFIG_INC=$optarg
++ shift
++ ;;
++
++ --disable-plugins)
++ QC_DISABLE_plugins="Y"
++ shift
++ ;;
++
++ --enable-plugins)
++ QC_ENABLE_PLUGINS="Y"
+ shift
+ ;;
+
+@@ -273,11 +412,34 @@
+ echo QC_DISABLE_growl=$QC_DISABLE_growl
+ echo QC_WITH_GROWL=$QC_WITH_GROWL
+ echo QC_DISABLE_xss=$QC_DISABLE_xss
+-echo QC_DISABLE_dnotify=$QC_DISABLE_dnotify
+-echo QC_DISABLE_ghbnr=$QC_DISABLE_ghbnr
+ echo QC_DISABLE_aspell=$QC_DISABLE_aspell
+ echo QC_WITH_ASPELL_INC=$QC_WITH_ASPELL_INC
+ echo QC_WITH_ASPELL_LIB=$QC_WITH_ASPELL_LIB
++echo QC_DISABLE_dnotify=$QC_DISABLE_dnotify
++echo QC_DISABLE_ghbnr=$QC_DISABLE_ghbnr
++echo QC_DISABLE_google_ft=$QC_DISABLE_google_ft
++echo QC_ENABLE_GOOGLE_FT=$QC_ENABLE_GOOGLE_FT
++echo QC_WITH_EXPAT_INC=$QC_WITH_EXPAT_INC
++echo QC_WITH_EXPAT_LIB=$QC_WITH_EXPAT_LIB
++echo QC_DISABLE_jingle=$QC_DISABLE_jingle
++echo QC_ENABLE_JINGLE=$QC_ENABLE_JINGLE
++echo QC_WITH_EXPAT_INC=$QC_WITH_EXPAT_INC
++echo QC_WITH_EXPAT_LIB=$QC_WITH_EXPAT_LIB
++echo QC_WITH_SPEEX_INC=$QC_WITH_SPEEX_INC
++echo QC_WITH_SPEEX_LIB=$QC_WITH_SPEEX_LIB
++echo QC_WITH_ILBC_INC=$QC_WITH_ILBC_INC
++echo QC_WITH_ILBC_LIB=$QC_WITH_ILBC_LIB
++echo QC_WITH_ORTP_INC=$QC_WITH_ORTP_INC
++echo QC_WITH_ORTP_LIB=$QC_WITH_ORTP_LIB
++echo QC_WITH_ALSA_INC=$QC_WITH_ALSA_INC
++echo QC_WITH_ALSA_LIB=$QC_WITH_ALSA_LIB
++echo QC_WITH_PORTAUDIO_INC=$QC_WITH_PORTAUDIO_INC
++echo QC_WITH_PORTAUDIO_LIB=$QC_WITH_PORTAUDIO_LIB
++echo QC_WITH_GLIB_INC=$QC_WITH_GLIB_INC
++echo QC_WITH_GLIB_LIB=$QC_WITH_GLIB_LIB
++echo QC_WITH_GLIBCONFIG_INC=$QC_WITH_GLIBCONFIG_INC
++echo QC_DISABLE_plugins=$QC_DISABLE_plugins
++echo QC_ENABLE_PLUGINS=$QC_ENABLE_PLUGINS
+ echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG
+ echo
+ fi
+@@ -419,7 +581,6 @@
+ // FIXME: Check QCA version number
+ if (QFile::exists("third-party/qca/qca")) {
+ conf->addExtra("CONFIG += qca-static");
+- conf->addDefine("QCA_NO_PLUGINS");
+ return true;
+ }
+ else {
+@@ -885,6 +1046,71 @@
+ return true;
+ }
+ };
++#line 1 "aspell.qcm"
++/*
++-----BEGIN QCMOD-----
++name: ASPELL
++arg: with-aspell-inc=[path],Path to Aspell include files
++arg: with-aspell-lib=[path],Path to Aspell library files
++-----END QCMOD-----
++*/
++
++//----------------------------------------------------------------------------
++// qc_spell
++//----------------------------------------------------------------------------
++class qc_aspell : public ConfObj
++{
++public:
++ qc_aspell(Conf *c) : ConfObj(c) {}
++ QString name() const { return "Aspell support"; }
++ QString shortname() const { return "aspell"; }
++ bool exec()
++ {
++ QString s;
++
++ s = conf->getenv("QC_WITH_ASPELL_INC");
++ if(!s.isEmpty()) {
++ if(!conf->checkHeader(s, "aspell.h")) {
++ conf->debug("Aspell includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++ else {
++ QStringList sl;
++ sl += "/usr/include";
++ sl += "/usr/local/include";
++ sl += "/sw/include";
++ if(!conf->findHeader("aspell.h", sl, &s)) {
++ conf->debug("Aspell includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++
++ s = conf->getenv("QC_WITH_ASPELL_LIB");
++ if(!s.isEmpty()) {
++ if(!conf->checkLibrary(s, "aspell")) {
++ conf->debug("Aspell libraries not found!");
++ return false;
++ }
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ if(!conf->findLibrary("aspell", &s)) {
++ conf->debug("Aspell libraries not found!");
++ return false;
++ }
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++
++ conf->addLib("-laspell");
++ conf->addDefine("HAVE_ASPELL");
++
++ return true;
++ }
++};
+ #line 1 "dnotify.qcm"
+ /*
+ -----BEGIN QCMOD-----
+@@ -961,67 +1187,488 @@
+ return true;
+ }
+ };
+-#line 1 "aspell.qcm"
++#line 1 "google_ft.qcm"
+ /*
+ -----BEGIN QCMOD-----
+-name: ASPELL
+-arg: with-aspell-inc=[path],Path to Aspell include files
+-arg: with-aspell-lib=[path],Path to Aspell library files
++name: Google File Transfer
++arg: enable-google-ft,Enable Google File Transfer support
++arg: with-expat-inc=[path],Path to Expat include files (for Google)
++arg: with-expat-lib=[path],Path to Expat library files (for Google)
+ -----END QCMOD-----
+ */
+
+ //----------------------------------------------------------------------------
+-// qc_spell
++// qc_google_ft
+ //----------------------------------------------------------------------------
+-class qc_aspell : public ConfObj
++class qc_google_ft : public ConfObj
+ {
+ public:
+- qc_aspell(Conf *c) : ConfObj(c) {}
+- QString name() const { return "Aspell support"; }
+- QString shortname() const { return "aspell"; }
++ qc_google_ft(Conf *c) : ConfObj(c) {}
++ QString name() const { return "Google File Transfer"; }
++ QString shortname() const { return "GoogleFT"; }
++ bool exec()
++ {
++ QString s = conf->getenv("QC_ENABLE_GOOGLE_FT");
++ if(s.isEmpty())
++ return false;
++
++ // Expat
++ s = conf->getenv("QC_WITH_EXPAT_INC");
++ if(!s.isEmpty()) {
++ if(!conf->checkHeader(s, "expat.h")) {
++ qWarning("Expat includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++ else {
++ if(!conf->findHeader("expat.h", QStringList(), &s)) {
++ qWarning("Expat includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++
++ s = conf->getenv("QC_WITH_EXPAT_LIB");
++ if(!s.isEmpty()) {
++ if(!conf->checkLibrary(s, "expat")) {
++ qWarning("Expat library not found!");
++ return false;
++ }
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ if(!conf->findLibrary("expat", &s)) {
++ qWarning("Expat library not found!");
++ return false;
++ }
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++
++ conf->addLib("-lexpat");
++
++ // Finish
++ conf->addExtra("CONFIG += google_ft");
++
++ return true;
++ }
++};
++#line 1 "jingle.qcm"
++/*
++-----BEGIN QCMOD-----
++name: Jingle
++arg: enable-jingle,Enable Jingle support
++arg: with-expat-inc=[path],Path to Expat include files (for Jingle)
++arg: with-expat-lib=[path],Path to Expat library files (for Jingle)
++arg: with-speex-inc=[path],Path to Speex include files (for Jingle)
++arg: with-speex-lib=[path],Path to Speex library files (for Jingle)
++arg: with-ilbc-inc=[path],Path to iLBC include files (for Jingle)
++arg: with-ilbc-lib=[path],Path to iLBC library files (for Jingle)
++arg: with-ortp-inc=[path],Path to ORTP include files (for Jingle)
++arg: with-ortp-lib=[path],Path to ORTP library files (for Jingle)
++arg: with-alsa-inc=[path],Path to Alsa include files (for Jingle)
++arg: with-alsa-lib=[path],Path to Alsa library files (for Jingle)
++arg: with-portaudio-inc=[path],Path to PortAudio include files (for Jingle)
++arg: with-portaudio-lib=[path],Path to PortAudio library files (for Jingle)
++arg: with-glib-inc=[path],Path to GLib include files (for Jingle)
++arg: with-glib-lib=[path],Path to GLib library files (for Jingle)
++arg: with-glibconfig-inc=[path],Path to glibconfig include file (for Jingle)
++-----END QCMOD-----
++*/
++
++//----------------------------------------------------------------------------
++// qc_jingle
++//----------------------------------------------------------------------------
++class qc_jingle : public ConfObj
++{
++public:
++ qc_jingle(Conf *c) : ConfObj(c) {}
++ QString name() const { return "Jingle"; }
++ QString shortname() const { return "Jingle"; }
+ bool exec()
+ {
+ QString s;
++
++ // Check if Jingle was enabled explicitly
++ s = conf->getenv("QC_ENABLE_JINGLE");
++ if(s.isEmpty())
++ return false;
++
++ // Expat
++ s = conf->getenv("QC_WITH_EXPAT_INC");
++ if(!s.isEmpty()) {
++ if(!conf->checkHeader(s, "expat.h")) {
++ qWarning("Expat includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++ else {
++ if(!conf->findHeader("expat.h", QStringList(), &s)) {
++ qWarning("Expat includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
+
+- s = conf->getenv("QC_WITH_ASPELL_INC");
++ s = conf->getenv("QC_WITH_EXPAT_LIB");
+ if(!s.isEmpty()) {
+- if(!conf->checkHeader(s, "aspell.h")) {
+- conf->debug("Aspell includes not found!");
++ if(!conf->checkLibrary(s, "expat")) {
++ qWarning("Expat library not found!");
++ return false;
++ }
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ if(!conf->findLibrary("expat", &s)) {
++ qWarning("Expat library not found!");
++ return false;
++ }
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++
++ conf->addLib("-lexpat");
++
++
++ // Speex
++ s = conf->getenv("QC_WITH_SPEEX_INC");
++ if(!s.isEmpty()) {
++ if(!conf->checkHeader(s, "speex.h")) {
++ qWarning("Speex includes not found!");
+ return false;
+ }
+ conf->addIncludePath(s);
+ }
+ else {
+ QStringList sl;
++ sl += "/usr/include/speex";
++ sl += "/usr/local/include/speex";
++ if(!conf->findHeader("speex.h", sl, &s)) {
++ qWarning("Speex includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++
++ s = conf->getenv("QC_WITH_SPEEX_LIB");
++ if(!s.isEmpty()) {
++ if(!conf->checkLibrary(s, "speex")) {
++ qWarning("Speex libraries not found!");
++ return false;
++ }
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ if(!conf->findLibrary("speex", &s)) {
++ qWarning("Speex libraries not found!");
++ return false;
++ }
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++
++ conf->addDefine("HAVE_SPEEX");
++ conf->addLib("-lspeex");
++
++
++ // ILBC (optional)
++ QString ilbc_include, ilbc_lib;
++ s = conf->getenv("QC_WITH_ILBC_INC");
++ if(!s.isEmpty()) {
++ if(conf->checkHeader(s, "iLBC_encode.h")) {
++ ilbc_include = s;
++ }
++ }
++ else {
++ QStringList sl;
++ sl += "/usr/include/ilbc";
++ sl += "/usr/local/include/ilbc";
++ if(conf->findHeader("iLBC_encode.h", sl, &s)) {
++ ilbc_include = s;
++ }
++ }
++
++ s = conf->getenv("QC_WITH_ILBC_LIB");
++ if(!s.isEmpty()) {
++ if(conf->checkLibrary(s, "ilbc")) {
++ ilbc_lib = s;
++ }
++ }
++ else {
++ if(conf->findLibrary("ilbc", &s)) {
++ ilbc_lib = s;
++ }
++ }
++
++ if (!ilbc_include.isEmpty() && !ilbc_lib.isEmpty()) {
++ conf->addIncludePath(ilbc_include);
++ conf->addLib(QString("-L") + ilbc_lib);
++ conf->addLib("-lilbc");
++ conf->addDefine("HAVE_ILBC");
++ }
++
++
++ // ORTP
++ s = conf->getenv("QC_WITH_ORTP_INC");
++ if(!s.isEmpty()) {
++ if(conf->checkHeader(s, "ortp/ortp.h")) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("ORTP includes not found!");
++ return false;
++ }
++ }
++ else {
++ QStringList sl;
+ sl += "/usr/include";
+ sl += "/usr/local/include";
+- sl += "/sw/include";
+- if(!conf->findHeader("aspell.h", sl, &s)) {
+- conf->debug("Aspell includes not found!");
++ if(conf->findHeader("ortp/ortp.h", sl, &s)) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("ORTP includes not found!");
++ return false;
++ }
++ }
++
++ s = conf->getenv("QC_WITH_ORTP_LIB");
++ if(!s.isEmpty()) {
++ if(conf->checkLibrary(s, "ortp")) {
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("ORTP libraries not found!");
++ return false;
++ }
++ }
++ else {
++ if(conf->findLibrary("ortp", &s)) {
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("ORTP libraries not found!");
++ return false;
++ }
++ }
++
++ conf->addLib("-lortp");
++ conf->addDefine("HAVE_ORTP");
++
++
++#if defined(Q_WS_X11)
++ s = conf->getenv("QC_WITH_ALSA_INC");
++ if(!s.isEmpty()) {
++ if(conf->checkHeader(s, "alsa/asoundlib.h")) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("Alsa includes not found!");
++ return false;
++ }
++ }
++ else {
++ QStringList sl;
++ sl += "/usr/include";
++ sl += "/usr/local/include";
++ if(conf->findHeader("alsa/asoundlib.h", sl, &s)) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("Alsa includes not found!");
++ return false;
++ }
++ }
++
++ s = conf->getenv("QC_WITH_ALSA_LIB");
++ if(!s.isEmpty()) {
++ if(conf->checkLibrary(s, "asound")) {
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("Alsa libraries not found!");
++ return false;
++ }
++ }
++ else {
++ if(conf->findLibrary("asound", &s)) {
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("Alsa libraries not found!");
++ return false;
++ }
++ }
++
++ conf->addLib("-lasound");
++ conf->addDefine("HAVE_ALSA_ASOUNDLIB_H");
++ conf->addDefine("__ALSA_ENABLED__");
++#elif defined(Q_WS_MAC)
++ // Check for PortAudio
++ s = conf->getenv("QC_WITH_PORTAUDIO_INC");
++ if(!s.isEmpty()) {
++ if(!conf->checkHeader(s, "portaudio.h")) {
++ qWarning("Portaudio includes not found!");
++ return false;
++ }
++ conf->addIncludePath(s);
++ }
++ else {
++ if(!conf->findHeader("portaudio.h", QStringList(), &s)) {
++ qWarning("Portaudio includes not found!");
+ return false;
+ }
+ conf->addIncludePath(s);
+ }
+
+- s = conf->getenv("QC_WITH_ASPELL_LIB");
++ s = conf->getenv("QC_WITH_PORTAUDIO_LIB");
+ if(!s.isEmpty()) {
+- if(!conf->checkLibrary(s, "aspell")) {
+- conf->debug("Aspell libraries not found!");
++ if(!conf->checkLibrary(s, "portaudio")) {
++ qWarning("PortAudio library not found!");
+ return false;
+ }
+ conf->addLib(QString("-L") + s);
+ }
+ else {
+- if(!conf->findLibrary("aspell", &s)) {
+- conf->debug("Aspell libraries not found!");
++ if(!conf->findLibrary("portaudio", &s)) {
++ qWarning("PortAudio library not found!");
+ return false;
+ }
+ if (!s.isEmpty())
+ conf->addLib(QString("-L") + s);
+ }
++
++ conf->addLib("-lportaudio");
++ conf->addDefine("HAVE_PORTAUDIO");
++#endif
++ QFile file("third-party/libjingle/config.h");
++ if (file.open(QIODevice::WriteOnly))
++ file.close();
+
+- conf->addLib("-laspell");
+- conf->addDefine("HAVE_ASPELL");
++ // GLib
++ s = conf->getenv("QC_WITH_GLIB_INC");
++ if(!s.isEmpty()) {
++ if(conf->checkHeader(s, "glib.h")) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("GLib includes not found!");
++ return false;
++ }
++ }
++ else {
++ QStringList sl;
++ sl += "/usr/include/glib";
++ sl += "/usr/local/include/glib";
++ sl += "/usr/include/glib-2.0";
++ if(conf->findHeader("glib.h", sl, &s)) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("GLib includes not found!");
++ return false;
++ }
++ }
++
++ s = conf->getenv("QC_WITH_GLIB_LIB");
++ if(!s.isEmpty()) {
++ if(conf->checkLibrary(s, "glib-2.0")) {
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("GLib 2.0 libraries not found!");
++ return false;
++ }
++ }
++ else {
++ if(conf->findLibrary("glib-2.0", &s)) {
++ if (!s.isEmpty())
++ conf->addLib(QString("-L") + s);
++ }
++ else {
++ qWarning("GLib 2.0 libraries not found!");
++ return false;
++ }
++ }
++
++ conf->addLib("-lglib-2.0 -lgmodule-2.0 -lgthread-2.0");
++ conf->addDefine("HAVE_GLIB");
++
++ // Glibconfig
++ s = conf->getenv("QC_WITH_GLIBCONFIG_INC");
++ if(!s.isEmpty()) {
++ if(conf->checkHeader(s, "glibconfig.h")) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("glibconfig.h includes not found!");
++ return false;
++ }
++ }
++ else {
++ if(conf->findHeader("glibconfig.h", QStringList("/usr/lib/glib-2.0/include"), &s)) {
++ conf->addIncludePath(s);
++ }
++ else {
++ qWarning("glibconfig.h not found!");
++ return false;
++ }
++ }
++
++ // Finish
++ conf->addExtra("CONFIG += jingle");
++
++ qWarning("");
++ qWarning("");
++ qWarning(" !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!");
++ qWarning(" LIBJINGLE SUPPORT IS STILL EXPERIMENTAL !!!");
++ qWarning(" USE AT YOUR OWN RISK !!!");
++
++ return true;
++ }
++};
++#line 1 "plugins.qcm"
++/*
++-----BEGIN QCMOD-----
++name: Plugins
++arg: enable-plugins,Enable Psi Plugin support
++
++-----END QCMOD-----
++*/
++
++//----------------------------------------------------------------------------
++// qc_plugins
++//----------------------------------------------------------------------------
++class qc_plugins : public ConfObj
++{
++public:
++ qc_plugins(Conf *c) : ConfObj(c) {}
++ QString name() const { return "Plugins"; }
++ QString shortname() const { return "Plugins"; }
++ bool exec()
++ {
++ QString s;
++
++ // Check if Jingle was enabled explicitly
++ s = conf->getenv("QC_ENABLE_PLUGINS");
++ if(s.isEmpty())
++ return false;
++
++ conf->addDefine("PSI_PLUGINS");
++
++ // Finish
++ conf->addExtra("CONFIG += psi_plugins");
++
++ qWarning("");
++ qWarning("");
++ qWarning(" !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!");
++ qWarning(" PLUGIN SUPPORT IS STILL UNFINISHED !!!");
++ qWarning(" THE PLUGIN INTERFACE /WILL/ CHANGE !!!");
++ qWarning(" USE AT YOUR OWN RISK !!!");
+
+ return true;
+ }
+@@ -1116,13 +1763,22 @@
+ o = new qc_xss(conf);
+ o->required = false;
+ o->disabled = false;
++ o = new qc_aspell(conf);
++ o->required = false;
++ o->disabled = false;
+ o = new qc_dnotify(conf);
+ o->required = false;
+ o->disabled = false;
+ o = new qc_ghbnr(conf);
+ o->required = false;
+ o->disabled = false;
+- o = new qc_aspell(conf);
++ o = new qc_google_ft(conf);
++ o->required = false;
++ o->disabled = false;
++ o = new qc_jingle(conf);
++ o->required = false;
++ o->disabled = false;
++ o = new qc_plugins(conf);
+ o->required = false;
+ o->disabled = false;
+ o = new qc_debug(conf);
+@@ -2083,11 +2739,34 @@
+ export QC_DISABLE_growl
+ export QC_WITH_GROWL
+ export QC_DISABLE_xss
+-export QC_DISABLE_dnotify
+-export QC_DISABLE_ghbnr
+ export QC_DISABLE_aspell
+ export QC_WITH_ASPELL_INC
+ export QC_WITH_ASPELL_LIB
++export QC_DISABLE_dnotify
++export QC_DISABLE_ghbnr
++export QC_DISABLE_google_ft
++export QC_ENABLE_GOOGLE_FT
++export QC_WITH_EXPAT_INC
++export QC_WITH_EXPAT_LIB
++export QC_DISABLE_jingle
++export QC_ENABLE_JINGLE
++export QC_WITH_EXPAT_INC
++export QC_WITH_EXPAT_LIB
++export QC_WITH_SPEEX_INC
++export QC_WITH_SPEEX_LIB
++export QC_WITH_ILBC_INC
++export QC_WITH_ILBC_LIB
++export QC_WITH_ORTP_INC
++export QC_WITH_ORTP_LIB
++export QC_WITH_ALSA_INC
++export QC_WITH_ALSA_LIB
++export QC_WITH_PORTAUDIO_INC
++export QC_WITH_PORTAUDIO_LIB
++export QC_WITH_GLIB_INC
++export QC_WITH_GLIB_LIB
++export QC_WITH_GLIBCONFIG_INC
++export QC_DISABLE_plugins
++export QC_ENABLE_PLUGINS
+ export QC_ENABLE_DEBUG
+ export QC_VERBOSE
+ rm -rf .qconftemp
Added: trunk/dports/net/psi/files/patch-src_about.ui.diff
===================================================================
--- trunk/dports/net/psi/files/patch-src_about.ui.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-src_about.ui.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,17 @@
+Index: src/about.ui
+===================================================================
+--- src/about.ui (Revision 764)
++++ src/about.ui (Arbeitskopie)
+@@ -101,8 +101,11 @@
+ </property>
+ <property name="text" >
+ <string>A cross-platform Jabber client designed for the Jabber power user.<br>
+-<br>
++ <br>
+ Copyright (C) 2001 - 2007 by Justin Karneges<br>
++
++This version of Psi has been been patched by Timo Engel (timo-e at freenet.de)
++
+ </string>
+ </property>
+ <property name="textFormat" >
Added: trunk/dports/net/psi/files/patch-src_pluginmanager.cpp.diff
===================================================================
--- trunk/dports/net/psi/files/patch-src_pluginmanager.cpp.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-src_pluginmanager.cpp.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,211 @@
+Index: src/pluginmanager.cpp
+===================================================================
+--- src/pluginmanager.cpp (Revision 764)
++++ src/pluginmanager.cpp (Arbeitskopie)
+@@ -1,12 +1,12 @@
+ #include <QtCore>
+ #include <QPluginLoader>
+-#include <QDebug>
+
+ #include "pluginmanager.h"
+ #include "psiplugin.h"
+ #include "userlist.h"
+ #include "applicationinfo.h"
+ #include "psioptions.h"
++#include "psiaccount.h"
+ #include <QtCrypto>
+
+
+@@ -103,14 +103,14 @@
+ */
+ bool PluginManager::loadPlugin( const QString& file )
+ {
+- qDebug() << "Loading Plugin " << file;
++ qDebug(qPrintable(QString("Loading Plugin %1").arg(file)));
+ //we can safely take the first key, as we won't have the same
+ // file belonging to multiple plugins
+ QList<QString> names = files_.keys(file);
+ if (! names.isEmpty() ) {
+ QString name = names.first();
+ if ( plugins_.contains(name) ) {
+- qWarning() << QString("Plugin %1 is already active, but this should never be.").arg(file);
++ qWarning( qPrintable( QString("Plugin %1 is already active, but this should never be.").arg(file) ) );
+ return false;
+ }
+ }
+@@ -160,16 +160,24 @@
+ if ( !plugin ) {
+ return false;
+ }
+- qDebug() << "loading plugin " << plugin->name();
++ qDebug( qPrintable( QString("loading plugin %1").arg(plugin->name() )));
+ plugins_.insert( plugin->name(), plugin );
+-
+- qDebug() << "connecting to plugin " << plugin->name();
++
++ qDebug(qPrintable(QString("connecting to plugin %1").arg(plugin->name())));
++ connect( plugin, SIGNAL(sendStanza(const QString&, const QString&)),
++ this, SLOT(sendStanza(const QString&, const QString&)));
+ connect( plugin, SIGNAL(sendStanza(const PsiAccount*, const QDomElement&)), this, SLOT(sendStanza(const PsiAccount*, const QDomElement&)));
+ connect( plugin, SIGNAL(sendStanza(const PsiAccount*, const QString&)), this, SLOT(sendStanza(const PsiAccount*, const QString&)));
+ connect( plugin, SIGNAL(setPluginOption( const QString&, const QVariant& )), this, SLOT( setPluginOption( const QString&, const QVariant& )));
+ connect( plugin, SIGNAL(getPluginOption( const QString&, QVariant&)), this, SLOT( getPluginOption( const QString&, QVariant&)));
+ connect( plugin, SIGNAL(setGlobalOption( const QString&, const QVariant& )), this, SLOT( setGlobalOption( const QString&, const QVariant& )));
+- connect( plugin, SIGNAL(getGlobalOption( const QString&, QVariant&)), this, SLOT( getGlobalOption( const QString&, QVariant&)));
++
++ connect(plugin, SIGNAL(getGlobalOption( const QString&, QVariant&)),
++ this, SLOT( getGlobalOption( const QString&, QVariant&)));
++
++ connect(plugin, SIGNAL(getHomeDir(QString&)),
++ this, SLOT(getHomeDir(QString&)));
++ plugin->init();
+ return true;
+ }
+
+@@ -203,7 +211,7 @@
+ qWarning( qPrintable( QString("Plugin %1 wasn't found when trying to unload").arg(plugin) ) );
+ return false;
+ }
+- qDebug() << "attempting to disconnect " << plugins_[plugin]->name();
++ qDebug(qPrintable(QString("attempting to disconnect %1").arg(plugins_[plugin]->name())));
+ plugins_[plugin]->disconnect();
+ QString file=files_[plugin];
+ if ( !loaders_.contains(file) ) {
+@@ -274,6 +282,9 @@
+ QDir dir(d);
+ foreach(QString file, dir.entryList()) {
+ file=dir.absoluteFilePath(file);
++ if (file.endsWith("..") || file.endsWith(".") ) {
++ continue;
++ }
+ qWarning(qPrintable(QString("Found plugin: %1").arg(file)));
+ if ( !loaders_.contains(file) ) {
+ loadPlugin(file);
+@@ -374,16 +385,56 @@
+ qDebug("not valid option");
+ }
+
+-void PluginManager::message(PsiAccount* account, const XMPP::Jid& from, const UserListItem* ul, const QString& message)
+-{
+- QString fromString=QString("%1").arg(from.full());
+- qDebug() << "message from %1" << fromString;
++/**
++ * incomingMessage. Function is only for non-HTML messages.
++ */
++QString PluginManager::incomingMessage(PsiAccount* account, const XMPP::Jid& from,
++ QString message) {
++ const QString toString = QString("%1").arg(account->jid().full());
++ const QString fromString=QString("%1").arg(from.full());
++ //qDebug() << "pluginmanager: incomming message from " << fromString
++ // << " to " << toString;
+ foreach(PsiPlugin* plugin, plugins_.values() ) {
+- plugin->message( account, message , fromString , from.full() );
++ message = plugin->incomingMessage(fromString, toString, message );
++ //qDebug() << plugin->shortName() << " returned: " << endl
++ // << message << "\n--\n";
+ }
++ //qDebug() << "PluginManager::incomingMessage:\n" << message << endl << "--";
++ return message;
+ }
+
+ /**
++ * incommingMessage with HTML content.
++ */
++HTMLElement PluginManager::incomingMessage( PsiAccount* account, const XMPP::Jid& from,
++ HTMLElement htmlMessage ) {
++ const QString toString = QString("%1").arg(account->jid().full());
++ const QString fromString=QString("%1").arg(from.full());
++ //qDebug() << "pluginmanager: incomming message from " << fromString
++ // << " to " << toString;
++ QDomElement body = htmlMessage.body();
++
++ //QString str;
++ //QTextStream ts( &str, IO_WriteOnly );
++ //body.save(ts, 8);
++ //qDebug() << "--\n" << str << "\n--\n\n";
++
++ foreach(PsiPlugin* plugin, plugins_.values() ) {
++ body = plugin->incomingMessage(fromString, toString, body );
++ //qDebug() << plugin->shortName() << " returned: " << endl
++ // << message << "\n--\n";
++ }
++
++ //QString str;
++ //QTextStream ts( &str, IO_WriteOnly );
++ //body.save(ts, 2);
++ //qDebug() << "pluginmanager: modified message:\n" << str << "\n--\n";
++
++ htmlMessage.setBody(body);
++ return htmlMessage;
++}
++
++/**
+ * \brief Give each plugin the opportunity to process the incoming event
+ *
+ * Each plugin is passed the event in turn. Any plugin may then modify the event
+@@ -423,13 +474,33 @@
+ */
+ void PluginManager::sendStanza( const PsiAccount* account, const QString& stanza)
+ {
+- qDebug() << "Want to send stanza to account " << (void*)account;
++ //qDebug(qPrintable(QString("Want to send stanza to account %2").arg((int)account)));
+ if (!clients_.contains(account) || !verifyStanza(stanza))
+ return;
+ clients_[account]->send(stanza);
+ }
+
++
+ /**
++ * Sends a stanza from the account spezified with fromJid.
++ *
++ */
++void PluginManager::sendStanza(const QString& fromJid, const QString& stanza) {
++ //qDebug() << "pluginmanager: sending stanza from account " << fromJid
++ // << endl << stanza << "\n--";
++ QMapIterator<const PsiAccount*, XMPP::Client*> iterator(clients_);
++ while (iterator.hasNext()) {
++ iterator.next();
++ const PsiAccount* account = iterator.key();
++ if ( ! QString::compare(account->jid().full(), fromJid, Qt::CaseInsensitive)) {
++ clients_.value(account)->send(stanza);
++ break;
++ }
++ }
++}
++
++
++/**
+ * Tells the plugin manager about an XMPP::Client and the owning PsiAccount
+ */
+ void PluginManager::addAccount( const PsiAccount* account, XMPP::Client* client)
+@@ -447,6 +518,30 @@
+ return true;
+ }
+
++
++/**
++ * process an outgoing message
++ */
++QString PluginManager::outgoingMessage( PsiAccount* account, const XMPP::Jid& to, QString message ) {
++ const QString toString=QString("%1").arg(to.full());
++ const QString fromString = QString("%1").arg(account->jid().full());
++ //qDebug() << "pluginmanager: outgoing message from " << fromString << " to "
++ // << toString;
++ foreach(PsiPlugin* plugin, plugins_.values() ) {
++ message = plugin->outgoingMessage( fromString, toString, message );
++ }
++ return message;
++
++}
++
++/**
++ * Get the home-directory used by psi.
++ */
++void PluginManager::getHomeDir(QString& dir) {
++ dir = ApplicationInfo::homeDir();
++}
++
++
+ PluginManager* PluginManager::instance_ = NULL;
+ const QString PluginManager::loadOptionPrefix = "plugins.auto-load";
+ const QString PluginManager::pluginOptionPrefix = "plugins.options";
Added: trunk/dports/net/psi/files/patch-src_pluginmanager.h.diff
===================================================================
--- trunk/dports/net/psi/files/patch-src_pluginmanager.h.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-src_pluginmanager.h.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,43 @@
+Index: src/pluginmanager.h
+===================================================================
+--- src/pluginmanager.h (Revision 764)
++++ src/pluginmanager.h (Arbeitskopie)
+@@ -7,6 +7,7 @@
+
+ #include "userlist.h"
+ #include "optionstree.h"
++#include "../iris/include/im.h"
+
+ class PsiPlugin;
+
+@@ -21,6 +22,8 @@
+
+ class QPluginLoader;
+
++using namespace XMPP;
++
+ class PluginManager : public QObject
+ {
+ Q_OBJECT
+@@ -30,8 +33,10 @@
+ QStringList availablePlugins();
+
+ void addAccount( const PsiAccount* account, XMPP::Client* client);
+- void message( PsiAccount* account, const XMPP::Jid& from,
+- const UserListItem*, const QString& message );
++ QString incomingMessage( PsiAccount* account, const XMPP::Jid& from, QString message );
++ HTMLElement incomingMessage( PsiAccount* account, const XMPP::Jid& from, HTMLElement htmlMessage );
++ QString outgoingMessage( PsiAccount* account, const XMPP::Jid& from, QString message );
++
+ bool loadPlugin( const QString& file );
+ void loadEnabledPlugins();
+ bool unloadPlugin( const QString& file );
+@@ -79,6 +84,8 @@
+ void optionChanged(const QString& option);
+ void sendStanza( const PsiAccount* account, const QDomElement& stanza);
+ void sendStanza( const PsiAccount* account, const QString& stanza);
++ void sendStanza(const QString& fromJid, const QString& stanza);
++ void getHomeDir(QString&);
+ };
+
+ #endif
Added: trunk/dports/net/psi/files/patch-src_psiaccount.cpp.diff
===================================================================
--- trunk/dports/net/psi/files/patch-src_psiaccount.cpp.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-src_psiaccount.cpp.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,70 @@
+Index: src/psiaccount.cpp
+===================================================================
+--- src/psiaccount.cpp (Revision 764)
++++ src/psiaccount.cpp (Arbeitskopie)
+@@ -3297,6 +3297,14 @@
+ }
+ }
+
++#ifdef PSI_PLUGINS
++ if (! nm.body().isEmpty()) {
++ nm.setBody(PluginManager::instance()->outgoingMessage(this, nm.to(), nm.body()));
++ }
++#endif
++
++
++
+ d->client->sendMessage(nm);
+
+ // only toggle if not an invite or body is not empty
+@@ -3566,10 +3574,34 @@
+ }
+ }
+
++
+ if(e->type() == PsiEvent::Message) {
++
+ MessageEvent *me = (MessageEvent *)e;
+- const Message &m = me->message();
++ Message msg = me->message();
++#ifdef PSI_PLUGINS
++ UserListItem *ulItem=NULL;
++ if ( !ul.isEmpty() ) {
++ ulItem=ul.first();
++ }
++
++ if (msg.containsHTML() && ! msg.html().text().isEmpty() ) {
++ HTMLElement htmlPart = PluginManager::instance()->incomingMessage(this,
++ msg.from(),
++ msg.html());
++ msg.setHTML(htmlPart, msg.lang());
++ msg.setBody(htmlPart.text());
++ }
++ else if (! msg.body().isEmpty()) {
++ msg.setBody( PluginManager::instance()->incomingMessage(this,
++ msg.from(),
++ msg.body()));
++ }
++ me->setMessage(msg);
++#endif
++ const Message &m = msg;
+
++
+ // Pass message events to chat window
+ if ((m.containsEvents() || m.chatState() != StateNone) && m.body().isEmpty()) {
+ if (option.messageEvents) {
+@@ -3632,13 +3664,7 @@
+ // FIXME: handle message errors
+ //msg.text = QString(tr("<big>[Error Message]</big><br>%1").arg(plain2rich(msg.text)));
+ }
+-#ifdef PSI_PLUGINS
+- UserListItem *ulItem=NULL;
+- if ( !ul.isEmpty() )
+- ulItem=ul.first();
+- PluginManager::instance()->message(this,e->from(),ulItem,((MessageEvent*)e)->message().body());
+-#endif
+- }
++}
+ else if(e->type() == PsiEvent::HttpAuth) {
+ playSound(option.onevent[eSystem]);
+ }
Added: trunk/dports/net/psi/files/patch-src_psiplugin.h.diff
===================================================================
--- trunk/dports/net/psi/files/patch-src_psiplugin.h.diff (rev 0)
+++ trunk/dports/net/psi/files/patch-src_psiplugin.h.diff 2008-02-02 17:02:01 UTC (rev 33659)
@@ -0,0 +1,120 @@
+Index: src/psiplugin.h
+===================================================================
+--- src/psiplugin.h (Revision 764)
++++ src/psiplugin.h (Arbeitskopie)
+@@ -28,6 +28,7 @@
+
+ #include <QObject>
+ #include <QtCore>
++#include <QtXml>
+
+ class PsiAccount;
+ class QDomElement;
+@@ -52,6 +53,7 @@
+ * \return Plugin name
+ */
+ virtual QString name() const = 0;
++
+ /** \brief Short name for the plugin
+ * This is the short name of the plugin, used for options structures.
+ * It must consist of only alphanumerics (no spaces or punctuation).
+@@ -66,10 +68,31 @@
+ */
+ virtual QString version() const = 0;
+
+- virtual void message( const PsiAccount* account, const QString& message, const QString& fromJid, const QString& fromDisplay)
+- {Q_UNUSED(account);Q_UNUSED(message);Q_UNUSED(fromJid);Q_UNUSED(fromDisplay);}
++ /**
++ * process incoming message
++ */
++ virtual QString incomingMessage( const QString& fromJid,
++ const QString& toJid,
++ const QString& message)
++ {Q_UNUSED(fromJid);Q_UNUSED(toJid);Q_UNUSED(message);return NULL;}
+
+ /**
++ * process incoming HTML message
++ */
++ virtual QDomElement incomingMessage( const QString& fromJid,
++ const QString& toJid,
++ const QDomElement& html)
++ {Q_UNUSED(fromJid);Q_UNUSED(toJid);Q_UNUSED(html);return QDomElement();}
++
++ /**
++ * process outgoing message
++ */
++ virtual QString outgoingMessage(const QString& fromJid,
++ const QString& toJid,
++ const QString& message)
++ {Q_UNUSED(fromJid);Q_UNUSED(toJid);Q_UNUSED(message); return NULL;}
++
++ /**
+ * \brief Plugin options widget
+ * This method is called by the Psi options system to retrieve
+ * a widget containing the options for this plugin.
+@@ -80,10 +103,17 @@
+ virtual QWidget* options() {return NULL;}
+
+
+- virtual bool processEvent( const PsiAccount* account, QDomNode &event ) {Q_UNUSED(account);Q_UNUSED(event);return true;}
++ /**
++ *
++ *
++ */
++ virtual bool processEvent( const PsiAccount* account, QDomNode &event )
++ {Q_UNUSED(account);Q_UNUSED(event);return true;}
+
++
+ /**
+- * Convenience method for plugins, allowing them to convert a QDomElement to a QString
++ * Convenience method for plugins, allowing them to convert a QDomElement
++ * to a QString
+ */
+ static QString toString(const QDomNode& xml)
+ {
+@@ -92,6 +122,9 @@
+ xml.save(stream, 0);
+ return QString(*stream.string());
+ }
++
++ /* initialize the plugin. called from the pluginmanager after loading */
++ virtual void init() {return;}
+
+ signals:
+ /**
+@@ -100,7 +133,7 @@
+ * \param account The account name, as used by the plugin interface.
+ * \param stanza The stanza to be sent.
+ */
+- //void sendStanza( const PsiAccount* account, const QDomElement& stanza);
++ void sendStanza( const PsiAccount* account, const QDomElement& stanza);
+
+ /**
+ * \brief Signals that the plugin wants to send a stanza.
+@@ -110,7 +143,14 @@
+ */
+ void sendStanza( const PsiAccount* account, const QString& stanza);
+
++
+ /**
++ * Send a stanza from the account with the jid fromJid.
++ *
++ */
++ void sendStanza( const QString& fromJid, const QString& stanza);
++
++ /**
+ * \brief Requests an item in the Psi menu for the plugin
+ *
+ * \param label The text to be inserted in the menu
+@@ -161,6 +201,11 @@
+ */
+ void getGlobalOption( const QString& option, QVariant& value);
+
++ /**
++ * Returns the home-directory used by psi
++ */
++ void getHomeDir(QString& dir);
++
+ //protected:
+
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080202/894fe961/attachment-0001.html
More information about the macports-changes
mailing list