Browse Source

Rename a number of libraries and executables to avoid conflicts with KDE4

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
dfe289850f
100 changed files with 396 additions and 5869 deletions
  1. 13
    13
      CMakeLists.txt
  2. 5
    5
      KDE2PORTING.html
  3. 7
    7
      KDE3PORTING.html
  4. 16
    16
      Mainpage.dox
  5. 11
    11
      Makefile.am.in
  6. 8
    8
      README
  7. 2
    2
      TODO
  8. 1
    1
      arts/knotify/Makefile.am
  9. 3
    3
      configure.in.in
  10. 3
    3
      dcop/Makefile.am
  11. 2
    2
      dcop/testdcop.cpp
  12. 2
    2
      dnssd/CMakeLists.txt
  13. 5
    5
      dnssd/Makefile.am
  14. 1
    1
      dnssd/README
  15. 0
    39
      dnssd/kcm_kdnssd.kcfg
  16. 39
    0
      dnssd/kcm_tdednssd.kcfg
  17. 1
    1
      dnssd/settings.kcfgc
  18. 1
    1
      doc/CMakeLists.txt
  19. 1
    1
      doc/Makefile.am
  20. 0
    13
      doc/kspell/CMakeLists.txt
  21. 0
    174
      doc/kspell/index.docbook
  22. 1
    1
      doc/tdelibs/man-kbuildsycoca.8.docbook
  23. 13
    0
      doc/tdespell/CMakeLists.txt
  24. 0
    0
      doc/tdespell/Makefile.am
  25. 174
    0
      doc/tdespell/index.docbook
  26. 4
    4
      interfaces/CMakeLists.txt
  27. 2
    2
      interfaces/Makefile.am
  28. 1
    1
      interfaces/khexedit/Makefile.am
  29. 1
    1
      interfaces/khexedit/byteseditinterface.h
  30. 0
    51
      interfaces/kimproxy/library/CMakeLists.txt
  31. 0
    26
      interfaces/kimproxy/library/Makefile.am
  32. 0
    653
      interfaces/kimproxy/library/kimproxy.cpp
  33. 0
    654
      interfaces/kimproxy/library/kimproxy.h
  34. 0
    38
      interfaces/kimproxy/library/kimproxyiface.h
  35. 0
    60
      interfaces/kmediaplayer/CMakeLists.txt
  36. 0
    18
      interfaces/kmediaplayer/Makefile.am
  37. 0
    46
      interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt
  38. 0
    13
      interfaces/kmediaplayer/kfileaudiopreview/Makefile.am
  39. 0
    146
      interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
  40. 0
    79
      interfaces/kmediaplayer/player.cpp
  41. 0
    143
      interfaces/kmediaplayer/player.h
  42. 0
    89
      interfaces/kmediaplayer/view.cpp
  43. 0
    56
      interfaces/kscript/CMakeLists.txt
  44. 0
    21
      interfaces/kscript/Makefile.am
  45. 0
    43
      interfaces/kscript/sample/CMakeLists.txt
  46. 0
    13
      interfaces/kscript/sample/Makefile.am
  47. 0
    104
      interfaces/kscript/scriptloader.cpp
  48. 0
    59
      interfaces/kscript/scriptloader.h
  49. 0
    132
      interfaces/kscript/scriptmanager.cpp
  50. 1
    1
      interfaces/kspeech/Makefile.am
  51. 1
    1
      interfaces/kspeech/kspeech.h
  52. 0
    96
      interfaces/ktexteditor/CMakeLists.txt
  53. 0
    52
      interfaces/ktexteditor/Makefile.am
  54. 0
    82
      interfaces/ktexteditor/blockselectioninterface.h
  55. 0
    74
      interfaces/ktexteditor/clipboardinterface.h
  56. 0
    202
      interfaces/ktexteditor/codecompletioninterface.h
  57. 0
    93
      interfaces/ktexteditor/configinterface.h
  58. 0
    116
      interfaces/ktexteditor/configinterfaceextension.h
  59. 0
    84
      interfaces/ktexteditor/cursorinterface.h
  60. 0
    85
      interfaces/ktexteditor/document.h
  61. 0
    60
      interfaces/ktexteditor/documentinfo.h
  62. 0
    64
      interfaces/ktexteditor/dynwordwrapinterface.h
  63. 0
    137
      interfaces/ktexteditor/editinterface.h
  64. 0
    74
      interfaces/ktexteditor/editinterfaceext.h
  65. 0
    65
      interfaces/ktexteditor/editor.h
  66. 0
    58
      interfaces/ktexteditor/editorchooser.h
  67. 0
    63
      interfaces/ktexteditor/encodinginterface.h
  68. 0
    92
      interfaces/ktexteditor/highlightinginterface.h
  69. 0
    242
      interfaces/ktexteditor/ktexteditor.cpp
  70. 0
    171
      interfaces/ktexteditor/markinterface.h
  71. 0
    83
      interfaces/ktexteditor/markinterfaceextension.h
  72. 0
    88
      interfaces/ktexteditor/plugin.h
  73. 0
    66
      interfaces/ktexteditor/popupmenuinterface.h
  74. 0
    63
      interfaces/ktexteditor/printinterface.h
  75. 0
    65
      interfaces/ktexteditor/searchinterface.h
  76. 0
    100
      interfaces/ktexteditor/selectioninterface.h
  77. 0
    74
      interfaces/ktexteditor/selectioninterfaceext.h
  78. 0
    71
      interfaces/ktexteditor/sessionconfiginterface.h
  79. 0
    131
      interfaces/ktexteditor/templateinterface.h
  80. 0
    79
      interfaces/ktexteditor/texthintinterface.h
  81. 0
    84
      interfaces/ktexteditor/undointerface.h
  82. 0
    68
      interfaces/ktexteditor/view.h
  83. 0
    95
      interfaces/ktexteditor/viewcursorinterface.h
  84. 0
    63
      interfaces/ktexteditor/viewstatusmsginterface.h
  85. 0
    66
      interfaces/ktexteditor/wordwrapinterface.h
  86. 0
    0
      interfaces/tdeimproxy/CMakeLists.txt
  87. 0
    0
      interfaces/tdeimproxy/Makefile.am
  88. 0
    0
      interfaces/tdeimproxy/TODO
  89. 0
    0
      interfaces/tdeimproxy/interface/CMakeLists.txt
  90. 0
    0
      interfaces/tdeimproxy/interface/Makefile.am
  91. 0
    0
      interfaces/tdeimproxy/interface/dcopinstantmessenger.desktop
  92. 0
    0
      interfaces/tdeimproxy/interface/kcm_instantmessenger.desktop
  93. 0
    0
      interfaces/tdeimproxy/interface/kimiface.h
  94. 51
    0
      interfaces/tdeimproxy/library/CMakeLists.txt
  95. 26
    0
      interfaces/tdeimproxy/library/Makefile.am
  96. 0
    0
      interfaces/tdeimproxy/library/icons/CMakeLists.txt
  97. 0
    0
      interfaces/tdeimproxy/library/icons/Makefile.am
  98. 0
    0
      interfaces/tdeimproxy/library/icons/cr16-action-presence_away.png
  99. 0
    0
      interfaces/tdeimproxy/library/icons/cr16-action-presence_offline.png
  100. 0
    0
      interfaces/tdeimproxy/library/icons/cr16-action-presence_online.png

+ 13
- 13
CMakeLists.txt View File

@@ -932,11 +932,11 @@ add_subdirectory( tdecore )
if( WITH_ELFICON )
add_subdirectory( tdelfeditor )
endif( WITH_ELFICON )
add_subdirectory( kunittest )
add_subdirectory( tdeunittest )
add_subdirectory( tdeui )
add_subdirectory( tdesu )
add_subdirectory( kjs )
add_subdirectory( kwallet )
add_subdirectory( tdewallet )
add_subdirectory( kio )
add_subdirectory( kded )

@@ -945,34 +945,34 @@ add_subdirectory( kded )

add_subdirectory( kdoctools )
add_subdirectory( doc )
add_subdirectory( kparts )
add_subdirectory( kutils )
add_subdirectory( kspell2 )
add_subdirectory( kmdi )
add_subdirectory( tdeparts )
add_subdirectory( tdeutils )
add_subdirectory( tdespell2 )
add_subdirectory( tdemdi )
add_subdirectory( kinit )
add_subdirectory( tdeprint )
add_subdirectory( kab )
add_subdirectory( kresources )
add_subdirectory( tderesources )
add_subdirectory( kabc )
add_subdirectory( arts )
add_subdirectory( interfaces )
add_subdirectory( kate )
add_subdirectory( kcert )
add_subdirectory( tdecert )
if( XRANDR_FOUND )
add_subdirectory( krandr )
add_subdirectory( tderandr )
endif( XRANDR_FOUND )
add_subdirectory( khtml )
add_subdirectory( tdehtml )
add_subdirectory( kcmshell )
add_subdirectory( kconf_update )
add_subdirectory( kdewidgets )
add_subdirectory( kimgio )
add_subdirectory( kioslave )
add_subdirectory( kstyles )
add_subdirectory( libkmid )
add_subdirectory( libkscreensaver )
add_subdirectory( libtdemid )
add_subdirectory( libtdescreensaver )
add_subdirectory( networkstatus )
add_subdirectory( knewstuff )
add_subdirectory( krsync )
add_subdirectory( tdersync )
add_subdirectory( licenses )
add_subdirectory( dnssd )
add_subdirectory( pics )

+ 5
- 5
KDE2PORTING.html View File

@@ -28,7 +28,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#KHelpMenu">KHelpMenu</A></LI>
<LI><A HREF="#KToolBar">KToolBar</A></LI>
<LI><A HREF="#launching">Starting other programs</A></LI>
<LI><A HREF="#khtmlw">khtmlw</A></LI>
<LI><A HREF="#tdehtmlw">tdehtmlw</A></LI>
<LI><A HREF="#KIntegerLine">KIntegerLine, KIntLineEdit</A></LI>
<LI><A HREF="#KDNDIcon">KDNDIcon, KDNDDropZone, KDNDWidget, tdecore/drag.h</A></LI>
<LI><A HREF="#TDEConfigBase">TDEConfigBase, TDEConfig, KSimpleConfig</A></LI>
@@ -347,9 +347,9 @@ This makes KRun the recommended way to run another program in KDE 2.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="khtmlw">khtmlw</A></H3>
<H3><A NAME="tdehtmlw">tdehtmlw</A></H3>

khtmlw has been replaced with khtml.<BR>
tdehtmlw has been replaced with tdehtml.<BR>
<UL>
<LI>KHTMLView has vanished. Just use KHTMLWidget, which does scrollbar
managing for free.
@@ -361,7 +361,7 @@ khtmlw has been replaced with khtml.<BR>
w-&gt;openURL(myURL);
</PRE>

<LI>khtml uses QString's instead of char *'s now. This means, that most
<LI>tdehtml uses QString's instead of char *'s now. This means, that most
of the api has changed. In all functions:<P>
<PRE>
const char * -&gt; QString
@@ -406,7 +406,7 @@ khtmlw has been replaced with khtml.<BR>
</TR>
</TABLE><P>

<LI>Don't forget to change the link-flags! (-lkhtml -lkjava instead of -lkhtmlw)
<LI>Don't forget to change the link-flags! (-ltdehtml -lkjava instead of -ltdehtmlw)
</UL>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

+ 7
- 7
KDE3PORTING.html View File

@@ -20,9 +20,9 @@ or <a href="http://doc.trolltech.com/3.0/porting.html">this page online</a>.<P>
<LI><A HREF="#tdecore">Changes in tdecore</A></LI>
<LI><A HREF="#tdeui">Changes in tdeui</A></LI>
<LI><A HREF="#kio">Changes in kio</A></LI>
<LI><A HREF="#kparts">Changes in kparts</A></LI>
<LI><A HREF="#kspell">Changes in kspell</A></LI>
<LI><A HREF="#khtmlpart">API-cleanup in KHTML</A></LI>
<LI><A HREF="#tdeparts">Changes in tdeparts</A></LI>
<LI><A HREF="#tdespell">Changes in tdespell</A></LI>
<LI><A HREF="#tdehtmlpart">API-cleanup in KHTML</A></LI>
<LI><A HREF="#kfile">Changes in kfile</A></LI>
<LI><A HREF="#kcontrol">TDE Control Center</A></LI>
<LI><A HREF="#kicker">Panel Applets and Extensions</A></LI>
@@ -416,7 +416,7 @@ TQString&) is not a slot anymore.

<H4>KOpenWithHandler / KFileOpenWithHandler</H4>
Those two classes are deprecated, no need to create a KFileOpenWithHandler anymore.
The merging of libkio, libksycoca, libkfile and libkssl into a single libkio has
The merging of libkio, libtdesycoca, libkfile and libkssl into a single libkio has
allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly.

<H4>KMimeType, KService</H4>
@@ -440,7 +440,7 @@ The createFilterDevice method is deprecated. Use deviceForFile instead.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="kparts">Changes in kparts</A></H3>
<H3><A NAME="tdeparts">Changes in tdeparts</A></H3>

<H4>KParts::Factory</H4>
The createPart method is no more virtual and the createPartObject method
@@ -468,7 +468,7 @@ setURLArgs does the job.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="kspell">Changes in kspell</A></H3>
<H3><A NAME="tdespell">Changes in tdespell</A></H3>

<H4>KSpell</H4>
The API has been cleaned up to be in line with the rest of tdelibs, in particular:
@@ -495,7 +495,7 @@ The API has been cleaned up to be in line with the rest of tdelibs, in particula

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="khtmlpart">API-cleanups in KHTML</A></H3>
<H3><A NAME="tdehtmlpart">API-cleanups in KHTML</A></H3>

There were a few relatively minor API-adjustements in KHTMLPart. In particular:
<ul><li>enableJScript(bool) has been replaced by setJScriptEnabled(bool)

+ 16
- 16
Mainpage.dox View File

@@ -14,8 +14,8 @@
* - <a target="_top" href="tdeui/html/index.html"><b>tdeui</b></a>
* (<a target="_top" href="tdeui/html/classes.html">classes</a>)\n
* <i>Trinity User interface classes such as widgets.</i>
* - <a target="_top" href="khtml/html/index.html"><b>khtml</b></a>
* (<a target="_top" href="khtml/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdehtml/html/index.html"><b>tdehtml</b></a>
* (<a target="_top" href="tdehtml/html/classes.html">classes</a>)\n
* <i>The Trinity HTML component.</i>
* - <a target="_top" href="kjs/html/index.html"><b>kjs</b></a>
* (<a target="_top" href="kjs/html/classes.html">classes</a>)\n
@@ -24,8 +24,8 @@
* (<a target="_top" href="kio/kio/html/classes.html">classes</a>)\n
* <i>Low level access to network files. Also provides access to facilities
* such as KDirWatcher which monitors directories for changes.</i>
* - <a target="_top" href="kparts/html/index.html"><b>kparts</b></a>
* (<a target="_top" href="kparts/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdeparts/html/index.html"><b>tdeparts</b></a>
* (<a target="_top" href="tdeparts/html/classes.html">classes</a>)\n
* <i>Support for re-usable, embeddable, extendable applications.</i>
* - <a target="_top" href="dcop/html/index.html"><b>dcop</b></a>
* (<a target="_top" href="dcop/html/classes.html">classes</a>)\n
@@ -33,17 +33,17 @@
* - <a target="_top" href="tdefx/html/index.html"><b>tdefx</b></a>
* (<a target="_top" href="tdefx/html/classes.html">classes</a>)\n
* <i>A library with pixmap effects.</i>
* - <a target="_top" href="kmdi/html/index.html"><b>kmdi</b></a>
* (<a target="_top" href="kmdi/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdemdi/html/index.html"><b>tdemdi</b></a>
* (<a target="_top" href="tdemdi/html/classes.html">classes</a>)\n
* <i>MultiDocument Interface library.</i>
* - <a target="_top" href="libkmid/html/index.html"><b>libkmid</b></a>
* (<a target="_top" href="libkmid/html/classes.html">classes</a>)\n
* - <a target="_top" href="libtdemid/html/index.html"><b>libtdemid</b></a>
* (<a target="_top" href="libtdemid/html/classes.html">classes</a>)\n
* <i>Midi library.</i>
* - <a target="_top" href="tdeprint/html/index.html"><b>tdeprint</b></a>
* (<a target="_top" href="tdeprint/html/classes.html">classes</a>)\n
* <i>High level printer control functionality.</i>
* - <a target="_top" href="krandr/html/index.html"><b>krandr</b></a>
* (<a target="_top" href="krandr/html/classes.html">classes</a>)\n
* - <a target="_top" href="tderandr/html/index.html"><b>tderandr</b></a>
* (<a target="_top" href="tderandr/html/classes.html">classes</a>)\n
* <i>High level Xorg configuration via XRandr.</i>
* - <a target="_top" href="interfaces/html/index.html"><b>interfaces</b></a>
* (<a target="_top" href="interfaces/html/classes.html">classes</a>)\n
@@ -52,11 +52,11 @@
* - <a target="_top" href="kabc/html/index.html"><b>kabc</b></a>
* (<a target="_top" href="kabc/html/classes.html">classes</a>)\n
* <i>Access to the Trinity address book.</i>
* - <a target="_top" href="kresources/html/index.html"><b>kresources</b></a>
* (<a target="_top" href="kresources/html/classes.html">classes</a>)\n
* - <a target="_top" href="tderesources/html/index.html"><b>tderesources</b></a>
* (<a target="_top" href="tderesources/html/classes.html">classes</a>)\n
* <i>The Trinity resources system.</i>
* - <a target="_top" href="kutils/html/index.html"><b>kutils</b></a>
* (<a target="_top" href="kutils/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdeutils/html/index.html"><b>tdeutils</b></a>
* (<a target="_top" href="tdeutils/html/classes.html">classes</a>)\n
* <i>High-level utils, like search/replace support.</i>
* - <a target="_top" href="arts/html/index.html"><b>arts</b></a>
* (<a target="_top" href="arts/html/classes.html">classes</a>)\n
@@ -67,8 +67,8 @@
* - <a target="_top" href="dnssd/html/index.html"><b>dnssd</b></a>
* (<a target="_top" href="dnssd/html/classes.html">classes</a>)\n
* <i>Network sevices publishing and discovery.</i>
* - <a target="_top" href="kunittest/html/index.html"><b>kunittest</b></a>
* (<a target="_top" href="kunittest/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdeunittest/html/index.html"><b>tdeunittest</b></a>
* (<a target="_top" href="tdeunittest/html/classes.html">classes</a>)\n
* <i>Unit testing framework in Trinity.</i>

*

+ 11
- 11
Makefile.am.in View File

@@ -18,17 +18,17 @@
# Boston, MA 02110-1301, USA.


COMPILE_FIRST = dcop libltdl tdefx tdecore kunittest tdeui tdesu kjs kwallet kio kded kded_post
COMPILE_FIRST = dcop libltdl tdefx tdecore tdeunittest tdeui tdesu kjs tdewallet kio kded kded_post
COMPILE_BEFORE_doc = kdoctools
COMPILE_AFTER_kparts = kspell2 kmdi tdeprint kinit kate interfaces kcert khtml krandr
COMPILE_AFTER_tdeprint = kate khtml
COMPILE_BEFORE_khtml = kutils
COMPILE_BEFORE_kabc = kab kresources
COMPILE_BEFORE_kate = interfaces kutils
COMPILE_BEFORE_kmdi = kutils
COMPILE_BEFORE_kspell2 = kutils
COMPILE_BEFORE_kcmshell = kutils
COMPILE_BEFORE_kdewidgets = kabc khtml
COMPILE_AFTER_tdeparts = tdespell2 tdemdi tdeprint kinit kate interfaces tdecert tdehtml tderandr
COMPILE_AFTER_tdeprint = kate tdehtml
COMPILE_BEFORE_tdehtml = tdeutils
COMPILE_BEFORE_kabc = kab tderesources
COMPILE_BEFORE_kate = interfaces tdeutils
COMPILE_BEFORE_tdemdi = tdeutils
COMPILE_BEFORE_tdespell2 = tdeutils
COMPILE_BEFORE_kcmshell = tdeutils
COMPILE_BEFORE_kdewidgets = kabc tdehtml
COMPILE_BEFORE_interfaces = arts kabc

$(top_srcdir)/acinclude.m4: $(top_srcdir)/libltdl/ltdl.m4
@@ -54,7 +54,7 @@ messages:
find $$dirs -maxdepth 1 -name "*.cc" -print >> files ;\
find $$dirs -maxdepth 1 -name "*.h" -print >> files ;\
echo ./tdecore/tde-config.cpp.in >> files ;\
$(EXTRACTRC) `find $$dirs -maxdepth 1 \( -name "*.rc" -o -name "*.ui" \) ` ./dnssd/kcm_kdnssd.kcfg > rc.cpp; \
$(EXTRACTRC) `find $$dirs -maxdepth 1 \( -name "*.rc" -o -name "*.ui" \) ` ./dnssd/kcm_tdednssd.kcfg > rc.cpp; \
: > kde.pot ;\
$(XGETTEXT) -ktranslate -x qt-messages.pot rc.cpp `cat files` && cat messages.po qt-messages.pot > $(podir)/tdelibs.pot
$(XGETTEXT) common_texts.cpp -o kde.pot

+ 8
- 8
README View File

@@ -27,7 +27,7 @@ Here is an alphabetical list:
communicate with KDE applications. It's also the base for KParts.

* interfaces
kparts interface for text editors, mediaplayer and scripting.
tdeparts interface for text editors, mediaplayer and scripting.

* kab
OBSOLETE, see kabc: Used to be the address book library, but now only
@@ -39,7 +39,7 @@ Here is an alphabetical list:
* kate
KPart for 'kate', the KDE advanced text editor.

* kcert
* tdecert
Personal certification manager.

* kconf_update
@@ -73,7 +73,7 @@ Here is an alphabetical list:
Contains mostly stuff convert XML docbook files via XSLT into
human readable stuff.

* khtml
* tdehtml
The next generation HTML rendering widget designed for Konqueror. This
supports HTML 4, CSS, and a variety of other web related standards.

@@ -86,7 +86,7 @@ Here is an alphabetical list:

* kio
Classes that fetch and decode URLs are contained here. This library also
contains "ksycoca", the system configure cache containing services,
contains "tdesycoca", the system configure cache containing services,
applications, servicetypes and mimetypes.

* kioslave
@@ -95,21 +95,21 @@ Here is an alphabetical list:
* kjs
Implementation of ECMAScript (aka JavaScript).

* kparts
* tdeparts
KDE component model.

* kstyles
The theme engine lies within. It handles nearly anything relating to
customizing the appearance of widgets.

* kwallet
* tdewallet
Client and backend to store values in encrypted files.

* libkmid
* libtdemid
MIDI file handling and midi mapper (manages output of midi files to
various devices).

* libkscreensaver
* libtdescreensaver
Library for making KDE screensavers.

* libltdl

+ 2
- 2
TODO View File

@@ -152,7 +152,7 @@ that we would like to make for the next binary incompatible release.
- merge KProcIO into TDEProcess; add setBuffered() for separate channels.
- use QByteArray for writeStdin(). better than the buf+len arg, as it is ref-counted.

- To discuss: Migrate the about dialog to use qhtml or khtml rather then the current
- To discuss: Migrate the about dialog to use qhtml or tdehtml rather then the current
setup of all of the widgets and sub widgets. Might be a lot simpler, require a lot
less code and be much more flexible for additions/enhancments. Sidenote: currently
the about information seems to be duplicated.
@@ -180,7 +180,7 @@ that we would like to make for the next binary incompatible release.

- KWallet::Wallet::* functions - remove the default = 0 argument for mainwindow for the dialog

- Make libkwalletclient part of libkio and get rid of libkwalletclient.
- Make libtdewalletclient part of libkio and get rid of libtdewalletclient.

- Get rid of libtdesu dependency in libkio, get rid of SessionData::AuthData*,
get rid of SlaveInterface::authorizationKey and SlaveInterface::delAuthorization

+ 1
- 1
arts/knotify/Makefile.am View File

@@ -15,7 +15,7 @@ knotify_la_METASOURCES = AUTO
check_PROGRAMS = knotifytest
knotifytest_SOURCES = knotifytest.cpp
knotifytest_LDADD = $(LIB_TDECORE)
knotifytest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
knotifytest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor

noinst_HEADERS = knotify.h


+ 3
- 3
configure.in.in View File

@@ -255,12 +255,12 @@ AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la')
AC_SUBST(LIB_KIO, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KFILE, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KHTML, '$(top_builddir)/khtml/libkhtml.la')
AC_SUBST(LIB_KHTML, '$(top_builddir)/tdehtml/libtdehtml.la')
AC_SUBST(LIB_TDEPRINT, '$(top_builddir)/tdeprint/libtdeprint.la')
AC_SUBST(LIB_KPARTS, '$(top_builddir)/kparts/libkparts.la')
AC_SUBST(LIB_KPARTS, '$(top_builddir)/tdeparts/libtdeparts.la')
AC_SUBST(LIB_KIMGIO, '$(top_builddir)/kimgio/libkimgio.la')
AC_SUBST(LIB_KNEWSTUFF, '$(top_builddir)/knewstuff/libknewstuff.la')
AC_SUBST(LIB_KUNITTEST, '$(top_builddir)/kunittest/libkunittest.la')
AC_SUBST(LIB_KUNITTEST, '$(top_builddir)/tdeunittest/libtdeunittest.la')
case $host in
*cygwin*) lib_kded='$(top_builddir)/kded/libtdeinit_kded.la' ;;
*) lib_kded='' ;;

+ 3
- 3
dcop/Makefile.am View File

@@ -50,15 +50,15 @@ dcopserver_la_LIBADD = libDCOP.la $(LIB_QT)

dcopserver_shutdown_SOURCES = dcopserver_shutdown.c

testdcop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
testdcop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
testdcop_SOURCES = testdcop.cpp
testdcop_LDADD = libDCOP.la

dcop_deadlock_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
dcop_deadlock_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
dcop_deadlock_test_SOURCES = dcop_deadlock_test.cpp
dcop_deadlock_test_LDADD = ../tdecore/libtdecore.la

testdcopc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
testdcopc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
testdcopc_SOURCES = testdcopc.c dcopc.c
testdcopc_LDADD = KDE-ICE/libkICE.la $(LIBSM)


+ 2
- 2
dcop/testdcop.cpp View File

@@ -258,12 +258,12 @@ int main(int argc, char **argv)
foundApp.data(), foundObj.data());

// Find an object called "object1" in any application.
boolResult = client->findObject( "", "ksycoca", "", data, foundApp, foundObj);
boolResult = client->findObject( "", "tdesycoca", "", data, foundApp, foundObj);
tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data());

// Find ourselves in any application.
boolResult = client->findObject( "testdcop", "ksycoca", "", data, foundApp, foundObj);
boolResult = client->findObject( "testdcop", "tdesycoca", "", data, foundApp, foundObj);
tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data());


+ 2
- 2
dnssd/CMakeLists.txt View File

@@ -31,9 +31,9 @@ install( FILES
DESTINATION ${INCLUDE_INSTALL_DIR}/dnssd )


##### kdnssd ####################################
##### tdednssd ####################################

set( target kdnssd )
set( target tdednssd )

set( ${target}_SRCS
remoteservice.cpp responder.cpp servicebase.cpp

+ 5
- 5
dnssd/Makefile.am View File

@@ -7,16 +7,16 @@ noinst_HEADERS = sdevent.h
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO

lib_LTLIBRARIES = libkdnssd.la
lib_LTLIBRARIES = libtdednssd.la

libkdnssd_la_SOURCES = remoteservice.cpp responder.cpp servicebase.cpp \
libtdednssd_la_SOURCES = remoteservice.cpp responder.cpp servicebase.cpp \
settings.kcfgc publicservice.cpp query.cpp domainbrowser.cpp servicebrowser.cpp
dnssdincludedir = $(includedir)/dnssd
dnssdinclude_HEADERS = domainbrowser.h query.h remoteservice.h \
publicservice.h servicebase.h servicebrowser.h settings.h
libkdnssd_la_LIBADD = ../tdecore/libtdecore.la $(AVAHI_LIBS) $(LIB_QT)
libkdnssd_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 1:0
libtdednssd_la_LIBADD = ../tdecore/libtdecore.la $(AVAHI_LIBS) $(LIB_QT)
libtdednssd_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 1:0

#kde_kcfg_DATA = kcm_kdnssd.kcfg
#kde_kcfg_DATA = kcm_tdednssd.kcfg

include ../admin/Doxyfile.am

+ 1
- 1
dnssd/README View File

@@ -1,7 +1,7 @@
Checklist to ensure that zeroconf will work:

1) Install Avahi, at least version 0.3
2) compile kdnssd-avahi and install it to replace 'stub' libkdnssd.so provided by tdelibs
2) compile tdednssd-avahi and install it to replace 'stub' libtdednssd.so provided by tdelibs
3) check /etc/nsswitch.conf and ensure that there is 'mdns' before 'dns' in
line starting with 'host:'. It should be something like:
host: files mdns dns

+ 0
- 39
dnssd/kcm_kdnssd.kcfg View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="kdnssdrc" />
<group name="browsing" >
<entry key="DomainList" type="StringList" >
<label>Additional domains for browsing</label>
<whatsthis>List of 'wide-area' (non link-local) domains that should be browsed.</whatsthis>
</entry>
<entry key="BrowseLocal" type="Bool" >
<label>Browse local network</label>
<whatsthis>If true .local domain will be browsed. It is always link-local, using multicast DNS.</whatsthis>
<default>true</default>
</entry>
<entry key="Recursive" type="Bool" >
<label>Recursive search for domains</label>
<whatsthis>Removed in KDE 3.5.0</whatsthis>
<default>false</default>
</entry>
</group>
<group name="publishing" >
<entry key="PublishType" type="Enum" >
<label>Select publishing in LAN (multicast) or WAN (unicast, needs configured DNS server)</label>
<whatsthis>Specifies if publishing should be by default link-local using multicast DNS (LAN) or 'wide-area' using normal DNS server (WAN).</whatsthis>
<default>LAN</default>
<choices>
<choice name="LAN" />
<choice name="WAN" />
</choices>
</entry>
<entry key="PublishDomain" type="String" >
<label>Name of default publishing domain for WAN</label>
<whatsthis>Domain name for publishing using 'wide-area' (normal DNS) ZeroConf. This must match domain specified in /etc/mdnsd.conf. This value is used only if PublishType is set to WAN.
</whatsthis>
</entry>
</group>
</kcfg>

+ 39
- 0
dnssd/kcm_tdednssd.kcfg View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="tdednssdrc" />
<group name="browsing" >
<entry key="DomainList" type="StringList" >
<label>Additional domains for browsing</label>
<whatsthis>List of 'wide-area' (non link-local) domains that should be browsed.</whatsthis>
</entry>
<entry key="BrowseLocal" type="Bool" >
<label>Browse local network</label>
<whatsthis>If true .local domain will be browsed. It is always link-local, using multicast DNS.</whatsthis>
<default>true</default>
</entry>
<entry key="Recursive" type="Bool" >
<label>Recursive search for domains</label>
<whatsthis>Removed in KDE 3.5.0</whatsthis>
<default>false</default>
</entry>
</group>
<group name="publishing" >
<entry key="PublishType" type="Enum" >
<label>Select publishing in LAN (multicast) or WAN (unicast, needs configured DNS server)</label>
<whatsthis>Specifies if publishing should be by default link-local using multicast DNS (LAN) or 'wide-area' using normal DNS server (WAN).</whatsthis>
<default>LAN</default>
<choices>
<choice name="LAN" />
<choice name="WAN" />
</choices>
</entry>
<entry key="PublishDomain" type="String" >
<label>Name of default publishing domain for WAN</label>
<whatsthis>Domain name for publishing using 'wide-area' (normal DNS) ZeroConf. This must match domain specified in /etc/mdnsd.conf. This value is used only if PublishType is set to WAN.
</whatsthis>
</entry>
</group>
</kcfg>

+ 1
- 1
dnssd/settings.kcfgc View File

@@ -1,5 +1,5 @@
ClassName=Configuration
File=kcm_kdnssd.kcfg
File=kcm_tdednssd.kcfg
GlobalEnums=false
Inherits=TDEConfigSkeleton
ItemAccessors=false

+ 1
- 1
doc/CMakeLists.txt View File

@@ -10,4 +10,4 @@
#################################################

add_subdirectory( common )
add_subdirectory( kspell )
add_subdirectory( tdespell )

+ 1
- 1
doc/Makefile.am View File

@@ -1,3 +1,3 @@

SUBDIRS = common kspell tdelibs
SUBDIRS = common tdespell tdelibs


+ 0
- 13
doc/kspell/CMakeLists.txt View File

@@ -1,13 +0,0 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

tde_create_handbook( SRCDIR ${CMAKE_SOURCE_DIR}/kdoctools DESTINATION kspell )
add_dependencies( kspell-en-handbook meinproc )

+ 0
- 174
doc/kspell/index.docbook View File

@@ -1,174 +0,0 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kappname "&kspell;">
<!ENTITY % English "INCLUDE" > <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>

<book lang="&language;">

<bookinfo>
<title>The &kspell; Handbook</title>

<authorgroup>
<author>&David.Sweet; &David.Sweet.mail;</author>

<!-- TRANS:ROLES_OF_TRANSLATORS -->

</authorgroup>

<date>2003-02-24</date>
<releaseinfo>1.00.00</releaseinfo>
<abstract>
<para>&kspell; is the spelling checker used by &tde; applications such
as &kate;, &kmail;, and &kword;. It is a &GUI; frontend to <application>International ISpell</application> and <application>ASpell</application>.</para>

</abstract>
<keywordset>
<keyword>spell</keyword>
<keyword>spelling</keyword>
<keyword>kspell</keyword>
<keyword>ispell</keyword>
<keyword>aspell</keyword>
<keyword>check</keyword>
<keyword>checker</keyword>
<keyword>KDE</keyword>
</keywordset>
</bookinfo>

<chapter id="misspelled-word-dialog">
<title>Misspelled Word Dialog</title>

<!-- This one might need a paragraph of its own) -->
<para>(If you do not have <application>Ispell</application> installed
you can obtain it from the <ulink
url="http://fmg-www.cs.ucla.edu/geoff/ispell.html">International
ISpell home page</ulink>. ASpell is available from the <ulink
url="http://aspell.sourceforge.net/">ASpell home page</ulink>.)
</para>

<sect1 id="general-use">
<title>General Use</title>

<para><anchor id="spelldlg"/>
The top line in the dialog displays a possibly misspelled word which was found in your
document. &kspell; attempts to find an appropriate replacement word. One or
several may be found. The best guess is shown to the right of <guilabel>Replacement:</guilabel>.
To accept this replacement, click on <guibutton>Replace</guibutton>. You may also select a word
from the list of <guilabel>Suggestions</guilabel> and then click <guibutton>Replace</guibutton> to replace the
misspelled word with the selected word.</para>

<para>To keep your original spelling, click on <guilabel>Ignore</guilabel>.</para>

<para>To stop the spellchecking -- keeping the changes you've already made -- click
on <guibutton>Stop</guibutton>.</para>

<para>To stop the spellchecking and cancel the changes you've already made, click on
<guibutton>Cancel</guibutton>.</para>

<para>Clicking on <guibutton>Replace All</guibutton> will initially perform the same function as
clicking on <guibutton>Replace</guibutton>, but will automatically replace the misspelled word
with the chosen replacement word, if it appears again (at a later point) in your
document.</para>

<para>The <guibutton>Ignore All</guibutton> button ignores this and all future occurrences of the
misspelled word.</para>

<para>Clicking on <guibutton>Add</guibutton> will add the misspelled word to your personal dictionary
(this is distinct from the original system dictionary, so the additions you make
will not be seen by other users).</para>
</sect1>
</chapter>

<chapter id="configuration-dialog">
<title>Configuration Dialog </title>
<anchor id="configuration"/>

<sect1 id="dictionaries">
<title>Dictionaries</title>

<para>You can choose the dictionary to use for spellchecking from the list of
installed dictionaries.</para>
</sect1>

<sect1 id="encodings">
<title>Encodings</title>

<para>The most commonly used character encodings are:
<variablelist>
<varlistentry>
<term>US-ASCII</term>
<listitem>
<para>This is the character set used for English text.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ISO-8859-1</term>
<listitem>
<para>This is used for Western European languages.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>UTF-8</term>
<listitem>
<para>This is a Unicode encoding that can be used for almost any language, if
your system has the necessary fonts.</para>
</listitem>
</varlistentry>
</variablelist>
</para>

<para>You should select the one that matches the character set you are using.
In some cases, dictionaries will support more than one encoding. A
dictionary might, for example, accept accented characters when <guilabel>ISO-8859-1</guilabel> is
selected, but accept email-style character combinations (like <literal>'a</literal> for an
accented <literal>a</literal>) when <guilabel>US-ASCII</guilabel> is selected. Please see
your dictionary's distribution for more information.</para>
</sect1>

<sect1 id="spell-checking-client">
<title>Spell-checking client</title>

<para>You may choose to use <application>Ispell</application> or <application>Aspell</application> as the spell-checking
backend for &kspell;. <application>Ispell</application> is more widely available and may
have better international support, but <application>Aspell</application> is gaining
popularity as it claims to give better suggestions for word replacements.</para>
</sect1>

<sect1 id="other">
<title>Other</title>

<para>It is recommend that you do not change the first two options unless you have
read the International <application>ISpell</application> man page.</para>
</sect1>
</chapter>

<chapter id="contact-information">
<title>Contact Information</title>

<para>For more information about &kspell;, visit the <ulink url="http://www.chaos.umd.edu/~dsweet/KDE/KSpell">&kspell;
Home Page</ulink>. In particular, you will find information about programming the &kspell; C++ class.</para>

<para>You may email the author/maintainer with questions and/or comments at
&David.Sweet.mail;.</para>

<para>
Documentation Copyright &copy; 2003 &David.Sweet; &David.Sweet.mail;
</para>

<!-- TRANS:CREDIT_FOR_TRANSLATORS -->

&underFDL; <!-- FDL: do not remove -->

</chapter>
&documentation.index;
</book>
<!--
Local Variables:
mode: sgml
sgml-omittag: nil
sgml-shorttag: t
sgml-general-insert-case: lower
End:
-->


+ 1
- 1
doc/tdelibs/man-kbuildsycoca.8.docbook View File

@@ -204,7 +204,7 @@ installations</para>
<refsect1>
<title>See Also</title>

<para>ksycoca(3), kblah(4), knogga(6)</para>
<para>tdesycoca(3), kblah(4), knogga(6)</para>

</refsect1>


+ 13
- 0
doc/tdespell/CMakeLists.txt View File

@@ -0,0 +1,13 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

tde_create_handbook( SRCDIR ${CMAKE_SOURCE_DIR}/kdoctools DESTINATION tdespell )
add_dependencies( tdespell-en-handbook meinproc )

doc/kspell/Makefile.am → doc/tdespell/Makefile.am View File


+ 174
- 0
doc/tdespell/index.docbook View File

@@ -0,0 +1,174 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kappname "&tdespell;">
<!ENTITY % English "INCLUDE" > <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>

<book lang="&language;">

<bookinfo>
<title>The &tdespell; Handbook</title>

<authorgroup>
<author>&David.Sweet; &David.Sweet.mail;</author>

<!-- TRANS:ROLES_OF_TRANSLATORS -->

</authorgroup>

<date>2003-02-24</date>
<releaseinfo>1.00.00</releaseinfo>
<abstract>
<para>&tdespell; is the spelling checker used by &tde; applications such
as &kate;, &kmail;, and &kword;. It is a &GUI; frontend to <application>International ISpell</application> and <application>ASpell</application>.</para>

</abstract>
<keywordset>
<keyword>spell</keyword>
<keyword>spelling</keyword>
<keyword>tdespell</keyword>
<keyword>ispell</keyword>
<keyword>aspell</keyword>
<keyword>check</keyword>
<keyword>checker</keyword>
<keyword>KDE</keyword>
</keywordset>
</bookinfo>

<chapter id="misspelled-word-dialog">
<title>Misspelled Word Dialog</title>

<!-- This one might need a paragraph of its own) -->
<para>(If you do not have <application>Ispell</application> installed
you can obtain it from the <ulink
url="http://fmg-www.cs.ucla.edu/geoff/ispell.html">International
ISpell home page</ulink>. ASpell is available from the <ulink
url="http://aspell.sourceforge.net/">ASpell home page</ulink>.)
</para>

<sect1 id="general-use">
<title>General Use</title>

<para><anchor id="spelldlg"/>
The top line in the dialog displays a possibly misspelled word which was found in your
document. &tdespell; attempts to find an appropriate replacement word. One or
several may be found. The best guess is shown to the right of <guilabel>Replacement:</guilabel>.
To accept this replacement, click on <guibutton>Replace</guibutton>. You may also select a word
from the list of <guilabel>Suggestions</guilabel> and then click <guibutton>Replace</guibutton> to replace the
misspelled word with the selected word.</para>

<para>To keep your original spelling, click on <guilabel>Ignore</guilabel>.</para>

<para>To stop the spellchecking -- keeping the changes you've already made -- click
on <guibutton>Stop</guibutton>.</para>

<para>To stop the spellchecking and cancel the changes you've already made, click on
<guibutton>Cancel</guibutton>.</para>

<para>Clicking on <guibutton>Replace All</guibutton> will initially perform the same function as
clicking on <guibutton>Replace</guibutton>, but will automatically replace the misspelled word
with the chosen replacement word, if it appears again (at a later point) in your
document.</para>

<para>The <guibutton>Ignore All</guibutton> button ignores this and all future occurrences of the
misspelled word.</para>

<para>Clicking on <guibutton>Add</guibutton> will add the misspelled word to your personal dictionary
(this is distinct from the original system dictionary, so the additions you make
will not be seen by other users).</para>
</sect1>
</chapter>

<chapter id="configuration-dialog">
<title>Configuration Dialog </title>
<anchor id="configuration"/>

<sect1 id="dictionaries">
<title>Dictionaries</title>

<para>You can choose the dictionary to use for spellchecking from the list of
installed dictionaries.</para>
</sect1>

<sect1 id="encodings">
<title>Encodings</title>

<para>The most commonly used character encodings are:
<variablelist>
<varlistentry>
<term>US-ASCII</term>
<listitem>
<para>This is the character set used for English text.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ISO-8859-1</term>
<listitem>
<para>This is used for Western European languages.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>UTF-8</term>
<listitem>
<para>This is a Unicode encoding that can be used for almost any language, if
your system has the necessary fonts.</para>
</listitem>
</varlistentry>
</variablelist>
</para>

<para>You should select the one that matches the character set you are using.
In some cases, dictionaries will support more than one encoding. A
dictionary might, for example, accept accented characters when <guilabel>ISO-8859-1</guilabel> is
selected, but accept email-style character combinations (like <literal>'a</literal> for an
accented <literal>a</literal>) when <guilabel>US-ASCII</guilabel> is selected. Please see
your dictionary's distribution for more information.</para>
</sect1>

<sect1 id="spell-checking-client">
<title>Spell-checking client</title>

<para>You may choose to use <application>Ispell</application> or <application>Aspell</application> as the spell-checking
backend for &tdespell;. <application>Ispell</application> is more widely available and may
have better international support, but <application>Aspell</application> is gaining
popularity as it claims to give better suggestions for word replacements.</para>
</sect1>

<sect1 id="other">
<title>Other</title>

<para>It is recommend that you do not change the first two options unless you have
read the International <application>ISpell</application> man page.</para>
</sect1>
</chapter>

<chapter id="contact-information">
<title>Contact Information</title>

<para>For more information about &tdespell;, visit the <ulink url="http://www.chaos.umd.edu/~dsweet/KDE/KSpell">&tdespell;
Home Page</ulink>. In particular, you will find information about programming the &tdespell; C++ class.</para>

<para>You may email the author/maintainer with questions and/or comments at
&David.Sweet.mail;.</para>

<para>
Documentation Copyright &copy; 2003 &David.Sweet; &David.Sweet.mail;
</para>

<!-- TRANS:CREDIT_FOR_TRANSLATORS -->

&underFDL; <!-- FDL: do not remove -->

</chapter>
&documentation.index;
</book>
<!--
Local Variables:
mode: sgml
sgml-omittag: nil
sgml-shorttag: t
sgml-general-insert-case: lower
End:
-->


+ 4
- 4
interfaces/CMakeLists.txt View File

@@ -9,12 +9,12 @@
#
#################################################

add_subdirectory( ktexteditor )
add_subdirectory( kscript )
add_subdirectory( tdetexteditor )
add_subdirectory( tdescript )
add_subdirectory( kregexpeditor )
add_subdirectory( kmediaplayer )
add_subdirectory( tdemediaplayer )
add_subdirectory( kio )
add_subdirectory( terminal )
add_subdirectory( khexedit )
add_subdirectory( kimproxy )
add_subdirectory( tdeimproxy )
add_subdirectory( kspeech )

+ 2
- 2
interfaces/Makefile.am View File

@@ -1,5 +1,5 @@
SUBDIRS = ktexteditor kscript kregexpeditor kmediaplayer kio terminal khexedit kimproxy kspeech
SUBDIRS = tdetexteditor tdescript kregexpeditor tdemediaplayer kio terminal khexedit tdeimproxy kspeech

DOXYGEN_REFERENCES = tdecore tdefx tdeui kparts dcop
DOXYGEN_REFERENCES = tdecore tdefx tdeui tdeparts dcop
DOXYGEN_SET_RECURSIVE = YES
include ../admin/Doxyfile.am

+ 1
- 1
interfaces/khexedit/Makefile.am View File

@@ -1,5 +1,5 @@

INCLUDES= -I$(top_srcdir)/kparts $(all_includes)
INCLUDES= -I$(top_srcdir)/tdeparts $(all_includes)

# the service type
servicetypedir = $(kde_servicetypesdir)

+ 1
- 1
interfaces/khexedit/byteseditinterface.h View File

@@ -19,7 +19,7 @@
#define BYTESEDITINTERFACE_H

// kde specific
#include <kparts/componentfactory.h>
#include <tdeparts/componentfactory.h>

#include <tqwidget.h>


+ 0
- 51
interfaces/kimproxy/library/CMakeLists.txt View File

@@ -1,51 +0,0 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

add_subdirectory( icons )

include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio/kio
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### headers ###################################

install( FILES
kimproxy.h kimproxyiface.h
DESTINATION ${INCLUDE_INSTALL_DIR} )


##### kimproxy ##################################

set( target kimproxy )

set( ${target}_SRCS
kimproxy.cpp kimproxyiface.skel
${CMAKE_SOURCE_DIR}/interfaces/kimproxy/interface/kimiface.stub
)

tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 0.0.0
LINK kio-shared
DESTINATION ${LIB_INSTALL_DIR}
DEPENDENCIES dcopidl
)

+ 0
- 26
interfaces/kimproxy/library/Makefile.am View File

@@ -1,26 +0,0 @@
SUBDIRS = icons

INCLUDES = $(all_includes)

noinst_HEADERS = kimproxyiface.h

METASOURCES = AUTO

AM_CPPFLAGS = $(all_includes)

messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kimproxy.pot

kimproxyincludedir = $(includedir)
kimproxyinclude_HEADERS = kimproxy.h kimproxyiface.h

lib_LTLIBRARIES = libkimproxy.la
libkimproxy_la_LDFLAGS = -no-undefined $(all_libraries)
libkimproxy_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI)
libkimproxy_la_SOURCES = kimproxy.cpp kimiface.stub kimproxyiface.skel

kimiface_DIR = $(top_srcdir)/interfaces/kimproxy/interface

include $(top_srcdir)/admin/Doxyfile.am
DOXYGEN_REFERENCES = kabc dcop


+ 0
- 653
interfaces/kimproxy/library/kimproxy.cpp View File

@@ -1,653 +0,0 @@
/*
kimproxy.cpp
IM service library for KDE
Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#include <tqglobal.h>
#include <tqpixmapcache.h>
#include <dcopclient.h>
#include <kapplication.h>
#include <kdcopservicestarter.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <ksimpleconfig.h>
#include <kiconloader.h>
#include <kservice.h>
#include <kservicetype.h>

#include "kimiface_stub.h"

#include "kimproxy.h"

static KStaticDeleter<KIMProxy> _staticDeleter;

KIMProxy * KIMProxy::s_instance = 0L;

struct AppPresenceCurrent
{
TQCString appId;
int presence;
};

class ContactPresenceListCurrent : public TQValueList<AppPresenceCurrent>
{
public:
// return value indicates if the supplied parameter was better than any existing presence
bool update( const AppPresenceCurrent );
AppPresenceCurrent best();
};


struct KIMProxy::Private
{
DCOPClient * dc;
// list of the strings in use by KIMIface
TQStringList presence_strings;
// list of the icon names in use by KIMIface
TQStringList presence_icons;
// map of presences
PresenceStringMap presence_map;
};

bool ContactPresenceListCurrent::update( AppPresenceCurrent ap )
{
if ( isEmpty() )
{
append( ap );
return true;
}
bool bestChanged = false;
AppPresenceCurrent best;
best.presence = -1;
ContactPresenceListCurrent::iterator it = begin();
const ContactPresenceListCurrent::iterator itEnd = end();
ContactPresenceListCurrent::iterator existing = itEnd;

while ( it != itEnd )
{
if ( (*it).presence > best.presence )
best = (*it);
if ( (*it).appId == ap.appId )
existing = it;
++it;
}
if ( ap.presence > best.presence ||
best.appId == ap.appId )
bestChanged = true;
if ( existing != itEnd )
{
remove( existing );
append( ap );
}
return bestChanged;
}

AppPresenceCurrent ContactPresenceListCurrent::best()
{
AppPresenceCurrent best;
best.presence = -1;
ContactPresenceListCurrent::iterator it = begin();
const ContactPresenceListCurrent::iterator itEnd = end();
while ( it != itEnd )
{
if ( (*it).presence > best.presence )
best = (*it);
++it;
}
// if it's still -1 here, we have no presence data, so we return Unknown
if ( best.presence == -1 )
best.presence = 0;
return best;
}

// int bestPresence( AppPresence* ap )
// {
// Q_ASSERT( ap );
// AppPresence::const_iterator it;
// it = ap->begin();
// int best = 0; // unknown
// if ( it != ap->end() )
// {
// best = it.data();
// ++it;
// for ( ; it != ap->end(); ++it )
// {
// if ( it.data() > best )
// best = it.data();
// }
// }
// return best;
// }
//
// TQCString bestAppId( AppPresence* ap )
// {
// Q_ASSERT( ap );
// AppPresence::const_iterator it;
// TQCString bestAppId;
// it = ap->begin();
// if ( it != ap->end() )
// {
// int best = it.data();
// bestAppId = it.key();
// ++it;
// for ( ; it != ap->end(); ++it )
// {
// if ( it.data() > best )
// {
// best = it.data();
// bestAppId = it.key();
// }
// }
// }
// return bestAppId;
// }

KIMProxy * KIMProxy::instance( DCOPClient * client )
{
if ( client )
{
if ( !s_instance )
_staticDeleter.setObject( s_instance, new KIMProxy( client ) );
return s_instance;
}
else
return 0L;
}

KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject(), d( new Private )
{
m_im_client_stubs.setAutoDelete( true );

d->dc = dc;
m_initialized = false;
connect( d->dc, TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
connect( d->dc, TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) );
d->dc->setNotifications( true );

d->presence_strings.append( "Unknown" );
d->presence_strings.append( "Offline" );
d->presence_strings.append( "Connecting" );
d->presence_strings.append( "Away" );
d->presence_strings.append( "Online" );
d->presence_icons.append( "presence_unknown" );
d->presence_icons.append( "presence_offline" );
d->presence_icons.append( "presence_connecting" );
d->presence_icons.append( "presence_away" );
d->presence_icons.append( "presence_online" );
//TQCString senderApp = "Kopete";
//TQCString senderObjectId = "KIMIface";
TQCString method = "contactPresenceChanged( TQString, TQCString, int )";
//TQCString receiverObjectId = "KIMProxyIface";
// FIXME: make this work when the sender object id is set to KIMIFace
if ( !connectDCOPSignal( 0, 0, method, method, false ) )
kdWarning() << "Couldn't connect DCOP signal. Won't receive any status notifications!" << endl;
}

KIMProxy::~KIMProxy( )
{
//d->dc->setNotifications( false );
}

bool KIMProxy::initialize()
{
if ( !m_initialized )
{
m_initialized = true; // we should only do this once, as registeredToDCOP() will catch any new starts
// So there is no error from a failed query when using tdelibs 3.2, which don't have this servicetype
if ( KServiceType::serviceType( IM_SERVICE_TYPE ) )
{
//kdDebug( 790 ) << k_funcinfo << endl;
TQCString dcopObjectId = "KIMIface";
// see what apps implementing our service type are out there
KService::List offers = KServiceType::offers( IM_SERVICE_TYPE );
KService::List::iterator offer;
typedef TQValueList<TQCString> QCStringList;
QCStringList registeredApps = d->dc->registeredApplications();
QCStringList::iterator app;
const QCStringList::iterator end = registeredApps.end();
// for each registered app
for ( app = registeredApps.begin(); app != end; ++app )
{
//kdDebug( 790 ) << " considering: " << *app << endl;
//for each offer
for ( offer = offers.begin(); offer != offers.end(); ++offer )
{
TQCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1();
if ( !dcopService.isEmpty() )
{
//kdDebug( 790 ) << " is it: " << dcopService << "?" << endl;
// get the application name ( minus any process ID )
TQCString instanceName = (*app).left( dcopService.length() );
// if the application implements the dcop service, add it
if ( instanceName == dcopService )
{
m_apps_available = true;
//kdDebug( 790 ) << " app name: " << (*offer)->name() << ", has instance " << *app << ", dcopService: " << dcopService << endl;
if ( !m_im_client_stubs.find( dcopService ) )
{
kdDebug( 790 ) << "App " << *app << ", dcopObjectId " << dcopObjectId << " found, using it for presence info." << endl;
m_im_client_stubs.insert( *app, new KIMIface_stub( d->dc, *app, dcopObjectId ) );
pollApp( *app );
}
}
}
}
}
}
}
return !m_im_client_stubs.isEmpty();
}

void KIMProxy::registeredToDCOP( const TQCString& appId )
{
//kdDebug( 790 ) << k_funcinfo << " appId '" << appId << "'" << endl;
// check that appId implements our service
// if the appId ends with a number, i.e. a pid like in foobar-12345,
if ( appId.isEmpty() )
return;

bool newApp = false;
// get an up to date list of offers in case a new app was installed
// and check each of the offers that implement the service type we're looking for,
// to see if any of them are the app that just registered
const KService::List offers = KServiceType::offers( IM_SERVICE_TYPE );
KService::List::const_iterator it;
for ( it = offers.begin(); it != offers.end(); ++it )
{
TQCString dcopObjectId = "KIMIface";
TQCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1();
if ( appId.left( dcopService.length() ) == dcopService )
{
// if it's not already known, insert it
if ( !m_im_client_stubs.find( appId ) )
{
newApp = true;
kdDebug( 790 ) << "App: " << appId << ", dcopService: " << dcopService << " started, using it for presence info."<< endl;
m_im_client_stubs.insert( appId, new KIMIface_stub( d->dc, appId, dcopObjectId ) );
}
}
//else
// kdDebug( 790 ) << "App doesn't implement our ServiceType" << endl;
}
//if ( newApp )
// emit sigPresenceInfoExpired();
}

void KIMProxy::unregisteredFromDCOP( const TQCString& appId )
{
//kdDebug( 790 ) << k_funcinfo << appId << endl;
if ( m_im_client_stubs.find( appId ) )
{
kdDebug( 790 ) << appId << " quit, removing its presence info." << endl;
PresenceStringMap::Iterator it = d->presence_map.begin();
const PresenceStringMap::Iterator end = d->presence_map.end();
for ( ; it != end; ++it )
{
ContactPresenceListCurrent list = it.data();
ContactPresenceListCurrent::iterator cpIt = list.begin();
while( cpIt != list.end() )
{
ContactPresenceListCurrent::iterator gone = cpIt++;
if ( (*gone).appId == appId )
{
list.remove( gone );
}
}
}
m_im_client_stubs.remove( appId );
emit sigPresenceInfoExpired();
}
}

void KIMProxy::contactPresenceChanged( TQString uid, TQCString appId, int presence )
{
// update the presence map
//kdDebug( 790 ) << k_funcinfo << "uid: " << uid << " appId: " << appId << " presence " << presence << endl;
ContactPresenceListCurrent current;
current = d->presence_map[ uid ];
//kdDebug( 790 ) << "current best presence from : " << current.best().appId << " is: " << current.best().presence << endl;
AppPresenceCurrent newPresence;
newPresence.appId = appId;
newPresence.presence = presence;

if ( current.update( newPresence ) )
{
d->presence_map.insert( uid, current );
emit sigContactPresenceChanged( uid );
}
}

int KIMProxy::presenceNumeric( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
if ( initialize() )
{
ContactPresenceListCurrent presence = d->presence_map[ uid ];
ap = presence.best();
}
return ap.presence;
}

TQString KIMProxy::presenceString( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
if ( initialize() )
{
ContactPresenceListCurrent presence = d->presence_map[ uid ];
ap = presence.best();
}
if ( ap.appId.isEmpty() )
return TQString::null;
else
return d->presence_strings[ ap.presence ];
}

TQPixmap KIMProxy::presenceIcon( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
if ( initialize() )
{
ContactPresenceListCurrent presence = d->presence_map[ uid ];
ap = presence.best();
}
if ( ap.appId.isEmpty() )
{
//kdDebug( 790 ) << k_funcinfo << "returning a null TQPixmap because we were asked for an icon for a uid we know nothing about" << endl;
return TQPixmap();
}
else
{
//kdDebug( 790 ) << k_funcinfo << "returning this: " << d->presence_icons[ ap.presence ] << endl;
return SmallIcon( d->presence_icons[ ap.presence ]);
}
}

TQStringList KIMProxy::allContacts()
{
TQStringList value = d->presence_map.keys();
return value;
}

TQStringList KIMProxy::reachableContacts()
{
TQStringList value;
if ( initialize() )
{
TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
value += it.current()->reachableContacts( );
}
}
return value;
}

TQStringList KIMProxy::onlineContacts()
{
TQStringList value;
PresenceStringMap::iterator it = d->presence_map.begin();
const PresenceStringMap::iterator end= d->presence_map.end();
for ( ; it != end; ++it )
if ( it.data().best().presence > 2 /*Better than Connecting, ie Away or Online*/ )
value.append( it.key() );
return value;
}

TQStringList KIMProxy::fileTransferContacts()
{
TQStringList value;
if ( initialize() )
{
TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
value += it.current()->fileTransferContacts( );
}
}
return value;
}

bool KIMProxy::isPresent( const TQString& uid )
{
return ( !d->presence_map[ uid ].isEmpty() );
}

TQString KIMProxy::displayName( const TQString& uid )
{
TQString name;
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
name = s->displayName( uid );
}
//kdDebug( 790 ) << k_funcinfo << name << endl;
return name;
}

bool KIMProxy::canReceiveFiles( const TQString & uid )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
return s->canReceiveFiles( uid );
}
return false;
}

bool KIMProxy::canRespond( const TQString & uid )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
return s->canRespond( uid );
}
return false;
}

TQString KIMProxy::context( const TQString & uid )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
return s->context( uid );
}
return TQString::null;
}
void KIMProxy::chatWithContact( const TQString& uid )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
{
kapp->updateRemoteUserTimestamp( s->app() );
s->chatWithContact( uid );
}
}
return;
}

void KIMProxy::messageContact( const TQString& uid, const TQString& message )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
{
kapp->updateRemoteUserTimestamp( s->app() );
s->messageContact( uid, message );
}
}
return;
}

void KIMProxy::sendFile(const TQString &uid, const KURL &sourceURL, const TQString &altFileName, uint fileSize )
{
if ( initialize() )
{
TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
if ( it.current()->canReceiveFiles( uid ) )
{
kapp->updateRemoteUserTimestamp( it.current()->app() );
it.current()->sendFile( uid, sourceURL, altFileName, fileSize );
break;
}
}
}
return;
}

bool KIMProxy::addContact( const TQString &contactId, const TQString &protocol )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForProtocol( protocol ) )
return s->addContact( contactId, protocol );
}
return false;
}

TQString KIMProxy::locate( const TQString & contactId, const TQString & protocol )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForProtocol( protocol ) )
return s->locate( contactId, protocol );
}
return TQString::null;
}

bool KIMProxy::imAppsAvailable()
{
return ( !m_im_client_stubs.isEmpty() );
}

bool KIMProxy::startPreferredApp()
{
TQString preferences = TQString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() );
// start/find an instance of DCOP/InstantMessenger
TQString error;
TQCString dcopService;
// Get a preferred IM client.
// The app will notify itself to us using registeredToDCOP, so we don't need to record a stub for it here
// FIXME: error in preferences, see debug output
preferences = TQString::null;
int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, TQString::null, preferences, &error, &dcopService );

kdDebug( 790 ) << k_funcinfo << "error was: " << error << ", dcopService: " << dcopService << endl;

return ( result == 0 );
}


void KIMProxy::pollAll( const TQString &uid )
{
/* // We only need to call this function if we don't have any data at all
// otherwise, the data will be kept fresh by received presence change
// DCOP signals
if ( !d->presence_map.contains( uid ) )
{
AppPresence *presence = new AppPresence();
// record current presence from known clients
TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
presence->insert( it.currentKey().ascii(), it.current()->presenceStatus( uid ) ); // m_im_client_stubs has qstring keys...
}
d->presence_map.insert( uid, presence );
}*/
}

void KIMProxy::pollApp( const TQCString & appId )
{
//kdDebug( 790 ) << k_funcinfo << endl;
KIMIface_stub * appStub = m_im_client_stubs[ appId ];
TQStringList contacts = m_im_client_stubs[ appId ]->allContacts();
TQStringList::iterator it = contacts.begin();
TQStringList::iterator end = contacts.end();
for ( ; it != end; ++it )
{
ContactPresenceListCurrent current = d->presence_map[ *it ];
AppPresenceCurrent ap;
ap.appId = appId;
ap.presence = appStub->presenceStatus( *it );
current.append( ap );

d->presence_map.insert( *it, current );
if ( current.update( ap ) )
emit sigContactPresenceChanged( *it );
//kdDebug( 790 ) << " uid: " << *it << " presence: " << ap.presence << endl;
}
}

KIMIface_stub * KIMProxy::stubForUid( const TQString &uid )
{
// get best appPresence
AppPresenceCurrent ap = d->presence_map[ uid ].best();
// look up the presence string from that app
return m_im_client_stubs.find( ap.appId );
}

KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol)
{
KIMIface_stub * app;
// see if the preferred client supports this protocol
TQString preferred = preferredApp();
if ( ( app = m_im_client_stubs.find( preferred ) ) )
{
if ( app->protocols().grep( protocol ).count() > 0 )
return app;
}
// preferred doesn't do this protocol, try the first of the others that says it does
TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
if ( it.current()->protocols().grep( protocol ).count() > 0 )
return it.current();
}
return 0L;
}

TQString KIMProxy::preferredApp()
{
TDEConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE );
store->setGroup( IM_CLIENT_PREFERENCES_SECTION );
TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY );
//kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl;
return preferredApp;
}

#include "kimproxy.moc"

+ 0
- 654
interfaces/kimproxy/library/kimproxy.h View File

@@ -1,654 +0,0 @@
/*
kimproxy.h

IM service library for KDE

Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#ifndef KIMPROXY_H
#define KIMPROXY_H

#include <tqdict.h>
#include <tqmap.h>
#include <tqptrdict.h>
#include <tqstringlist.h>


#define IM_SERVICE_TYPE "DCOP/InstantMessenger"
#define IM_CLIENT_PREFERENCES_FILE "default_components"
#define IM_CLIENT_PREFERENCES_SECTION "InstantMessenger"
#define IM_CLIENT_PREFERENCES_ENTRY "imClient"

#include "kimproxyiface.h"

class DCOPClient;
class KIMIface_stub;
class KURL;
class ContactPresenceListCurrent;

/** FIXME: remove for KDE4, binary compability again. */
typedef TQMap<TQCString, int> AppPresence; // appId->presence; contains all applications' ideas of a user's presence
typedef TQDict<AppPresence> PresenceMap; // uid->AppPresence; contains a AppPresences for all users
/** FIXME: remove presenceMap and call this presenceMap in KDE4. This hack is for binary compatibility */
typedef TQMap<TQString, ContactPresenceListCurrent> PresenceStringMap;

/**
* @brief Provides access to instant messenger programs which implement KDE's
* instant messanger interface KIMIface
*
* This class provides an easy-to-use interface to all running instant
* messengers or chat programs that implement KIMIface.
*
* It works simultaneously with any running programs that implement the
* ServiceType @c DCOP/InstantMessenger.
*
* IM-contacts are identified using unique identifier strings (UID) used by
* KDE's address book framework KABC.
* However the use of the address book API is optional, KIMProxy provides
* methods to fetch lists of available contact UIDs from the applications.
* If a UID is reachable with more than one program, KIMProxy aggregates the
* available information and presents the 'best' presence. For example, for a
* contact who can be seen to be @c Away in @c IRC on program A but @c Online
* using @c ICQ on program B, the information from program B will be used.
*
* KIMProxy is designed for simple information in a wide number of cases, not
* for detailed messaging.
*
* The class is implemented as a singleton, so whenever you need access to
* one of its methods, just retrieve the single instance using instance().
* The following code snippet demonstrated how to send a message to all
* reachable IM-contacts:
* @code
* // get proxy instance
* KIMProxy* proxy = KIMProxy::instance();
*
* // check if there are suitable applications reachable
* if (!proxy->initialize()) return;
*
* TQString message = "Hi!\nHow are you on this wonderful day?";
*
* // iterate over the list of reachable contacts
* TQStringList reachableContacts = proxy->reachableContacts();
* for (TQStringList::const_iterator it = reachableContacts.begin();
* it != reachableContacts.end(); ++it)
* {
proxy->messageContact(*it, message);
* }
* @endcode
*
* @note While it is possible to communicate with each of those application's
* by DCOP using KIMProxy has the advantage of communicating with all
* applications simultaneously and thus getting an augmented view of
* availability, capability and presence (online status) of IM-contacts.
*
* @see KIMIface
* @see KABC::AddressBook
* @see KABC::Addressee
*
* @since 3.3
* @author Will Stephenson <lists@stevello.free-online.co.uk>
*/
class KIMPROXY_EXPORT KIMProxy : public TQObject, virtual public KIMProxyIface
{
Q_OBJECT
struct Private;

template<class> friend class KStaticDeleter;
~KIMProxy();

public:
/**
* @brief Obtain an instance of KIMProxy
*
* Creates a new instance if it is called for the first time.
* Call initialize() to check if there are applications available for
* communication.
*
* @note KIMProxy uses DCOPClient::setNotifications() to make sure
* it updates its information about IM applications it interacts with,
* e.g. that it gets notified about newly available applications or
* about applications exiting
*
* @param client your application's DCOP client
* @return the singleton instance of this class
*/
static KIMProxy * instance( DCOPClient * client );

/**
* @brief Get the proxy ready to connect
*
* Discover any running IM clients and setup communication handlers for
* them. The list of available clients is updated automatically
* through notification about added or removed DCOP applications as
* provided by DCOPClient.
*
* It is safe to call this method more than once, initialization only
* occurs at the first time.
*
* @return whether the proxy is ready to use.
* @c false if there are no suitable apps running
*/
bool initialize();

/**
* @brief Obtain a list of IM-contacts known to IM-applications
*
* Returns a list of KABC UIDs gathered by merging the lists of
* each application the proxy can communicate with.
* The method uses cached information to make it fast and not
* require actually communicating with the applications every time
* it is called.
*
* @return a list of KABC UIDs known to any IM-application
*
* @see reachableContacts()
* @see onlineContacts()
* @see fileTransferContacts()
* @see isPresent()
* @see KABC::Addressee::uid()
*/
TQStringList allContacts();

/**
* @brief Obtain a list of IM-contacts that are currently reachable
*
* Returns a list of KABC UIDs gathered by merging the lists of
* each application the proxy can communicate with.
*
* @return a list of KABC UIDs who can receive a message, even if offline
*
* @see allContacts()
* @see onlineContacts()
* @see fileTransferContacts()
* @see messageContact()
* @see KABC::Addressee::uid()
*/
TQStringList reachableContacts();

/**
* @brief Obtain a list of IM-contacts that are currently online
*
* Returns a list of KABC UIDs gathered by merging the lists of
* each application the proxy can communicate with.
* The method uses cached information to make it fast and not
* require actually communicating with the applications every time
* it is called.
*
* @return a list of KABC UIDs who are online with unspecified presence
*
* @see allContacts()
* @see reachableContacts()
* @see fileTransferContacts()
* @see messageContact()
* @see chatWithContact()
* @see KABC::Addressee::uid()
*/
TQStringList onlineContacts();

/**
* @brief Obtain a list of IM-contacts who may receive file transfers
*
* Returned IM-contacts might not be capable of receiving file
* tranfers due to limitations of their clients or because they are
* behind a firewall.
* KIMProxy doesn't have the possibilities to discover this and will
* list them as well.
*
* Returns a list of KABC UIDs gathered by merging the lists of
* each application the proxy can communicate with.
*
* @return a list of KABC UIDs capable of file transfer
*
* @see allContacts()
* @see reachableContacts()
* @see onlineContacts()
* @see canReceiveFiles()
* @see KABC::Addressee::uid()
*/
TQStringList fileTransferContacts();

/**
* @brief Confirm if a given contact is known to the proxy
*
* A contact is known to the proxy if it is know to at least one
* IM-application the proxy is communicating with.
*
* The method uses cached information to make it fast and not
* require actually communicating with the applications every time
* it is called.
*
* @param uid the KABC UID you are interested in
* @return whether any IM-program knows of this KABC UID
*
* @see allContacts()
* @see presenceString()
* @see presenceNumeric()