Browse Source

Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.

BUG:215923


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
toma 9 years ago
commit
bcb704366c
100 changed files with 13257 additions and 0 deletions
  1. 3
    0
      AUTHORS
  2. 347
    0
      COPYING
  3. 397
    0
      COPYING-DOCS
  4. 176
    0
      INSTALL
  5. 12
    0
      Mainpage.dox
  6. 10
    0
      Makefile.am.in
  7. 16
    0
      Makefile.cvs
  8. 45
    0
      README
  9. 69
    0
      configure.in.bot
  10. 129
    0
      configure.in.in
  11. 28
    0
      dcoprss/Makefile.am
  12. 49
    0
      dcoprss/article.cpp
  13. 129
    0
      dcoprss/cache.cpp
  14. 86
    0
      dcoprss/cache.h
  15. 75
    0
      dcoprss/client.cpp
  16. 307
    0
      dcoprss/document.cpp
  17. 144
    0
      dcoprss/feedbrowser.cpp
  18. 66
    0
      dcoprss/feedbrowser.h
  19. 39
    0
      dcoprss/main.cpp
  20. 271
    0
      dcoprss/query.cpp
  21. 120
    0
      dcoprss/query.h
  22. 115
    0
      dcoprss/rssnewsfeed.h
  23. 88
    0
      dcoprss/rssservice.desktop
  24. 105
    0
      dcoprss/service.cpp
  25. 290
    0
      dcoprss/service.h
  26. 24
    0
      dcoprss/test.sh
  27. 401
    0
      dcoprss/xmlrpciface.cpp
  28. 185
    0
      dcoprss/xmlrpciface.h
  29. 5
    0
      doc/Makefile.am
  30. 6
    0
      doc/kcontrol/Makefile.am
  31. 2
    0
      doc/kcontrol/kcmktalkd/Makefile.am
  32. 55
    0
      doc/kcontrol/kcmktalkd/index.docbook
  33. 2
    0
      doc/kcontrol/lanbrowser/Makefile.am
  34. 15
    0
      doc/kcontrol/lanbrowser/index.docbook
  35. 3
    0
      doc/kdict/Makefile.am
  36. BIN
      doc/kdict/applet.png
  37. BIN
      doc/kdict/conf.png
  38. 1052
    0
      doc/kdict/index.docbook
  39. BIN
      doc/kdict/mainwin.png
  40. BIN
      doc/kdict/seteditor.png
  41. 3
    0
      doc/kget/Makefile.am
  42. BIN
      doc/kget/fileopen.png
  43. 751
    0
      doc/kget/index.docbook
  44. BIN
      doc/kget/kget1.png
  45. BIN
      doc/kget/kget2.png
  46. BIN
      doc/kget/kget3.png
  47. BIN
      doc/kget/kget4.png
  48. BIN
      doc/kget/kget5.png
  49. 4
    0
      doc/knewsticker/Makefile.am
  50. 4
    0
      doc/knewsticker/TODO
  51. BIN
      doc/knewsticker/about-icon.png
  52. BIN
      doc/knewsticker/checknews-icon.png
  53. BIN
      doc/knewsticker/contextmenu.png
  54. BIN
      doc/knewsticker/help-icon.png
  55. 1399
    0
      doc/knewsticker/index.docbook
  56. BIN
      doc/knewsticker/kcmnewsticker-filters.png
  57. BIN
      doc/knewsticker/kcmnewsticker-general.png
  58. BIN
      doc/knewsticker/kcmnewsticker-newssitedialog.png
  59. BIN
      doc/knewsticker/kcmnewsticker-newssources.png
  60. BIN
      doc/knewsticker/kcmnewsticker-scrollerprefs.png
  61. BIN
      doc/knewsticker/kcontrol-icon.png
  62. BIN
      doc/knewsticker/knewsticker-childpanel.png
  63. BIN
      doc/knewsticker/knewsticker-icon.png
  64. BIN
      doc/knewsticker/knewsticker-kicker.png
  65. BIN
      doc/knewsticker/knewsticker-ownwindow.png
  66. BIN
      doc/knewsticker/newarticle-icon.png
  67. BIN
      doc/knewsticker/newssite-icon.png
  68. BIN
      doc/knewsticker/oldarticle-icon.png
  69. BIN
      doc/knewsticker/preferences-icon.png
  70. 3
    0
      doc/kopete/Makefile.am
  71. 363
    0
      doc/kopete/chatstyle.docbook
  72. 1025
    0
      doc/kopete/index.docbook
  73. 876
    0
      doc/kopete/menus.docbook
  74. 3
    0
      doc/kpf/Makefile.am
  75. 410
    0
      doc/kpf/index.docbook
  76. 4
    0
      doc/kppp/Makefile.am
  77. 158
    0
      doc/kppp/accounting.docbook
  78. 268
    0
      doc/kppp/callback.docbook
  79. 191
    0
      doc/kppp/chap.docbook
  80. 55
    0
      doc/kppp/costsgraphs.fig
  81. BIN
      doc/kppp/costsgraphs.png
  82. 765
    0
      doc/kppp/dialog-setup.docbook
  83. 52
    0
      doc/kppp/getting-online.docbook
  84. 385
    0
      doc/kppp/global-settings.docbook
  85. 927
    0
      doc/kppp/hayes.docbook
  86. 268
    0
      doc/kppp/index.docbook
  87. BIN
      doc/kppp/kppp-account-accounting-tab.png
  88. BIN
      doc/kppp/kppp-account-dial-tab.png
  89. BIN
      doc/kppp/kppp-account-dns-tab.png
  90. BIN
      doc/kppp/kppp-account-execute-tab.png
  91. BIN
      doc/kppp/kppp-account-gateway-tab.png
  92. BIN
      doc/kppp/kppp-account-ip-tab.png
  93. BIN
      doc/kppp/kppp-account-login-script-tab.png
  94. BIN
      doc/kppp/kppp-config.png
  95. BIN
      doc/kppp/kppp-device-tab.png
  96. BIN
      doc/kppp/kppp-dialler-tab.png
  97. 477
    0
      doc/kppp/kppp-faq.docbook
  98. BIN
      doc/kppp/kppp-graph-tab.png
  99. BIN
      doc/kppp/kppp-misc-tab.png
  100. 0
    0
      doc/kppp/kppp-modem-tab.png

+ 3
- 0
AUTHORS View File

@@ -0,0 +1,3 @@
1
+Look in the subdirs to get info about the authors.
2
+ 
3
+The package is maintained by Stephan Kulow <coolo@kde.org>

+ 347
- 0
COPYING View File

@@ -0,0 +1,347 @@
1
+NOTE! The GPL below is copyrighted by the Free Software Foundation, but
2
+the instance of code that it refers to (the kde programs) are copyrighted
3
+by the authors who actually wrote it.
4
+
5
+---------------------------------------------------------------------------
6
+			
7
+		    GNU GENERAL PUBLIC LICENSE
8
+		       Version 2, June 1991
9
+
10
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
11
+               59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
12
+ Everyone is permitted to copy and distribute verbatim copies
13
+ of this license document, but changing it is not allowed.
14
+
15
+			    Preamble
16
+
17
+  The licenses for most software are designed to take away your
18
+freedom to share and change it.  By contrast, the GNU General Public
19
+License is intended to guarantee your freedom to share and change free
20
+software--to make sure the software is free for all its users.  This
21
+General Public License applies to most of the Free Software
22
+Foundation's software and to any other program whose authors commit to
23
+using it.  (Some other Free Software Foundation software is covered by
24
+the GNU Library General Public License instead.)  You can apply it to
25
+your programs, too.
26
+
27
+  When we speak of free software, we are referring to freedom, not
28
+price.  Our General Public Licenses are designed to make sure that you
29
+have the freedom to distribute copies of free software (and charge for
30
+this service if you wish), that you receive source code or can get it
31
+if you want it, that you can change the software or use pieces of it
32
+in new free programs; and that you know you can do these things.
33
+
34
+  To protect your rights, we need to make restrictions that forbid
35
+anyone to deny you these rights or to ask you to surrender the rights.
36
+These restrictions translate to certain responsibilities for you if you
37
+distribute copies of the software, or if you modify it.
38
+
39
+  For example, if you distribute copies of such a program, whether
40
+gratis or for a fee, you must give the recipients all the rights that
41
+you have.  You must make sure that they, too, receive or can get the
42
+source code.  And you must show them these terms so they know their
43
+rights.
44
+
45
+  We protect your rights with two steps: (1) copyright the software, and
46
+(2) offer you this license which gives you legal permission to copy,
47
+distribute and/or modify the software.
48
+
49
+  Also, for each author's protection and ours, we want to make certain
50
+that everyone understands that there is no warranty for this free
51
+software.  If the software is modified by someone else and passed on, we
52
+want its recipients to know that what they have is not the original, so
53
+that any problems introduced by others will not reflect on the original
54
+authors' reputations.
55
+
56
+  Finally, any free program is threatened constantly by software
57
+patents.  We wish to avoid the danger that redistributors of a free
58
+program will individually obtain patent licenses, in effect making the
59
+program proprietary.  To prevent this, we have made it clear that any
60
+patent must be licensed for everyone's free use or not licensed at all.
61
+
62
+  The precise terms and conditions for copying, distribution and
63
+modification follow.
64
+
65
+		    GNU GENERAL PUBLIC LICENSE
66
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
67
+
68
+  0. This License applies to any program or other work which contains
69
+a notice placed by the copyright holder saying it may be distributed
70
+under the terms of this General Public License.  The "Program", below,
71
+refers to any such program or work, and a "work based on the Program"
72
+means either the Program or any derivative work under copyright law:
73
+that is to say, a work containing the Program or a portion of it,
74
+either verbatim or with modifications and/or translated into another
75
+language.  (Hereinafter, translation is included without limitation in
76
+the term "modification".)  Each licensee is addressed as "you".
77
+
78
+Activities other than copying, distribution and modification are not
79
+covered by this License; they are outside its scope.  The act of
80
+running the Program is not restricted, and the output from the Program
81
+is covered only if its contents constitute a work based on the
82
+Program (independent of having been made by running the Program).
83
+Whether that is true depends on what the Program does.
84
+
85
+  1. You may copy and distribute verbatim copies of the Program's
86
+source code as you receive it, in any medium, provided that you
87
+conspicuously and appropriately publish on each copy an appropriate
88
+copyright notice and disclaimer of warranty; keep intact all the
89
+notices that refer to this License and to the absence of any warranty;
90
+and give any other recipients of the Program a copy of this License
91
+along with the Program.
92
+
93
+You may charge a fee for the physical act of transferring a copy, and
94
+you may at your option offer warranty protection in exchange for a fee.
95
+
96
+  2. You may modify your copy or copies of the Program or any portion
97
+of it, thus forming a work based on the Program, and copy and
98
+distribute such modifications or work under the terms of Section 1
99
+above, provided that you also meet all of these conditions:
100
+
101
+    a) You must cause the modified files to carry prominent notices
102
+    stating that you changed the files and the date of any change.
103
+
104
+    b) You must cause any work that you distribute or publish, that in
105
+    whole or in part contains or is derived from the Program or any
106
+    part thereof, to be licensed as a whole at no charge to all third
107
+    parties under the terms of this License.
108
+
109
+    c) If the modified program normally reads commands interactively
110
+    when run, you must cause it, when started running for such
111
+    interactive use in the most ordinary way, to print or display an
112
+    announcement including an appropriate copyright notice and a
113
+    notice that there is no warranty (or else, saying that you provide
114
+    a warranty) and that users may redistribute the program under
115
+    these conditions, and telling the user how to view a copy of this
116
+    License.  (Exception: if the Program itself is interactive but
117
+    does not normally print such an announcement, your work based on
118
+    the Program is not required to print an announcement.)
119
+
120
+These requirements apply to the modified work as a whole.  If
121
+identifiable sections of that work are not derived from the Program,
122
+and can be reasonably considered independent and separate works in
123
+themselves, then this License, and its terms, do not apply to those
124
+sections when you distribute them as separate works.  But when you
125
+distribute the same sections as part of a whole which is a work based
126
+on the Program, the distribution of the whole must be on the terms of
127
+this License, whose permissions for other licensees extend to the
128
+entire whole, and thus to each and every part regardless of who wrote it.
129
+
130
+Thus, it is not the intent of this section to claim rights or contest
131
+your rights to work written entirely by you; rather, the intent is to
132
+exercise the right to control the distribution of derivative or
133
+collective works based on the Program.
134
+
135
+In addition, mere aggregation of another work not based on the Program
136
+with the Program (or with a work based on the Program) on a volume of
137
+a storage or distribution medium does not bring the other work under
138
+the scope of this License.
139
+
140
+  3. You may copy and distribute the Program (or a work based on it,
141
+under Section 2) in object code or executable form under the terms of
142
+Sections 1 and 2 above provided that you also do one of the following:
143
+
144
+    a) Accompany it with the complete corresponding machine-readable
145
+    source code, which must be distributed under the terms of Sections
146
+    1 and 2 above on a medium customarily used for software interchange; or,
147
+
148
+    b) Accompany it with a written offer, valid for at least three
149
+    years, to give any third party, for a charge no more than your
150
+    cost of physically performing source distribution, a complete
151
+    machine-readable copy of the corresponding source code, to be
152
+    distributed under the terms of Sections 1 and 2 above on a medium
153
+    customarily used for software interchange; or,
154
+
155
+    c) Accompany it with the information you received as to the offer
156
+    to distribute corresponding source code.  (This alternative is
157
+    allowed only for noncommercial distribution and only if you
158
+    received the program in object code or executable form with such
159
+    an offer, in accord with Subsection b above.)
160
+
161
+The source code for a work means the preferred form of the work for
162
+making modifications to it.  For an executable work, complete source
163
+code means all the source code for all modules it contains, plus any
164
+associated interface definition files, plus the scripts used to
165
+control compilation and installation of the executable.  However, as a
166
+special exception, the source code distributed need not include
167
+anything that is normally distributed (in either source or binary
168
+form) with the major components (compiler, kernel, and so on) of the
169
+operating system on which the executable runs, unless that component
170
+itself accompanies the executable.
171
+
172
+If distribution of executable or object code is made by offering
173
+access to copy from a designated place, then offering equivalent
174
+access to copy the source code from the same place counts as
175
+distribution of the source code, even though third parties are not
176
+compelled to copy the source along with the object code.
177
+
178
+  4. You may not copy, modify, sublicense, or distribute the Program
179
+except as expressly provided under this License.  Any attempt
180
+otherwise to copy, modify, sublicense or distribute the Program is
181
+void, and will automatically terminate your rights under this License.
182
+However, parties who have received copies, or rights, from you under
183
+this License will not have their licenses terminated so long as such
184
+parties remain in full compliance.
185
+
186
+  5. You are not required to accept this License, since you have not
187
+signed it.  However, nothing else grants you permission to modify or
188
+distribute the Program or its derivative works.  These actions are
189
+prohibited by law if you do not accept this License.  Therefore, by
190
+modifying or distributing the Program (or any work based on the
191
+Program), you indicate your acceptance of this License to do so, and
192
+all its terms and conditions for copying, distributing or modifying
193
+the Program or works based on it.
194
+
195
+  6. Each time you redistribute the Program (or any work based on the
196
+Program), the recipient automatically receives a license from the
197
+original licensor to copy, distribute or modify the Program subject to
198
+these terms and conditions.  You may not impose any further
199
+restrictions on the recipients' exercise of the rights granted herein.
200
+You are not responsible for enforcing compliance by third parties to
201
+this License.
202
+
203
+  7. If, as a consequence of a court judgment or allegation of patent
204
+infringement or for any other reason (not limited to patent issues),
205
+conditions are imposed on you (whether by court order, agreement or
206
+otherwise) that contradict the conditions of this License, they do not
207
+excuse you from the conditions of this License.  If you cannot
208
+distribute so as to satisfy simultaneously your obligations under this
209
+License and any other pertinent obligations, then as a consequence you
210
+may not distribute the Program at all.  For example, if a patent
211
+license would not permit royalty-free redistribution of the Program by
212
+all those who receive copies directly or indirectly through you, then
213
+the only way you could satisfy both it and this License would be to
214
+refrain entirely from distribution of the Program.
215
+
216
+If any portion of this section is held invalid or unenforceable under
217
+any particular circumstance, the balance of the section is intended to
218
+apply and the section as a whole is intended to apply in other
219
+circumstances.
220
+
221
+It is not the purpose of this section to induce you to infringe any
222
+patents or other property right claims or to contest validity of any
223
+such claims; this section has the sole purpose of protecting the
224
+integrity of the free software distribution system, which is
225
+implemented by public license practices.  Many people have made
226
+generous contributions to the wide range of software distributed
227
+through that system in reliance on consistent application of that
228
+system; it is up to the author/donor to decide if he or she is willing
229
+to distribute software through any other system and a licensee cannot
230
+impose that choice.
231
+
232
+This section is intended to make thoroughly clear what is believed to
233
+be a consequence of the rest of this License.
234
+
235
+  8. If the distribution and/or use of the Program is restricted in
236
+certain countries either by patents or by copyrighted interfaces, the
237
+original copyright holder who places the Program under this License
238
+may add an explicit geographical distribution limitation excluding
239
+those countries, so that distribution is permitted only in or among
240
+countries not thus excluded.  In such case, this License incorporates
241
+the limitation as if written in the body of this License.
242
+
243
+  9. The Free Software Foundation may publish revised and/or new versions
244
+of the General Public License from time to time.  Such new versions will
245
+be similar in spirit to the present version, but may differ in detail to
246
+address new problems or concerns.
247
+
248
+Each version is given a distinguishing version number.  If the Program
249
+specifies a version number of this License which applies to it and "any
250
+later version", you have the option of following the terms and conditions
251
+either of that version or of any later version published by the Free
252
+Software Foundation.  If the Program does not specify a version number of
253
+this License, you may choose any version ever published by the Free Software
254
+Foundation.
255
+
256
+  10. If you wish to incorporate parts of the Program into other free
257
+programs whose distribution conditions are different, write to the author
258
+to ask for permission.  For software which is copyrighted by the Free
259
+Software Foundation, write to the Free Software Foundation; we sometimes
260
+make exceptions for this.  Our decision will be guided by the two goals
261
+of preserving the free status of all derivatives of our free software and
262
+of promoting the sharing and reuse of software generally.
263
+
264
+			    NO WARRANTY
265
+
266
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
267
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
268
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
269
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
270
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
271
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
272
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
273
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
274
+REPAIR OR CORRECTION.
275
+
276
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
277
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
278
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
279
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
280
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
281
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
282
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
283
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
284
+POSSIBILITY OF SUCH DAMAGES.
285
+
286
+		     END OF TERMS AND CONDITIONS
287
+
288
+
289
+	    How to Apply These Terms to Your New Programs
290
+
291
+  If you develop a new program, and you want it to be of the greatest
292
+possible use to the public, the best way to achieve this is to make it
293
+free software which everyone can redistribute and change under these terms.
294
+
295
+  To do so, attach the following notices to the program.  It is safest
296
+to attach them to the start of each source file to most effectively
297
+convey the exclusion of warranty; and each file should have at least
298
+the "copyright" line and a pointer to where the full notice is found.
299
+
300
+    <one line to give the program's name and a brief idea of what it does.>
301
+    Copyright (C) 19yy  <name of author>
302
+
303
+    This program is free software; you can redistribute it and/or modify
304
+    it under the terms of the GNU General Public License as published by
305
+    the Free Software Foundation; either version 2 of the License, or
306
+    (at your option) any later version.
307
+
308
+    This program is distributed in the hope that it will be useful,
309
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
310
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
311
+    GNU General Public License for more details.
312
+
313
+    You should have received a copy of the GNU General Public License
314
+    along with this program; if not, write to the Free Software
315
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
316
+
317
+
318
+Also add information on how to contact you by electronic and paper mail.
319
+
320
+If the program is interactive, make it output a short notice like this
321
+when it starts in an interactive mode:
322
+
323
+    Gnomovision version 69, Copyright (C) 19yy name of author
324
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
325
+    This is free software, and you are welcome to redistribute it
326
+    under certain conditions; type `show c' for details.
327
+
328
+The hypothetical commands `show w' and `show c' should show the appropriate
329
+parts of the General Public License.  Of course, the commands you use may
330
+be called something other than `show w' and `show c'; they could even be
331
+mouse-clicks or menu items--whatever suits your program.
332
+
333
+You should also get your employer (if you work as a programmer) or your
334
+school, if any, to sign a "copyright disclaimer" for the program, if
335
+necessary.  Here is a sample; alter the names:
336
+
337
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
338
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
339
+
340
+  <signature of Ty Coon>, 1 April 1989
341
+  Ty Coon, President of Vice
342
+
343
+This General Public License does not permit incorporating your program into
344
+proprietary programs.  If your program is a subroutine library, you may
345
+consider it more useful to permit linking proprietary applications with the
346
+library.  If this is what you want to do, use the GNU Library General
347
+Public License instead of this License.

+ 397
- 0
COPYING-DOCS View File

@@ -0,0 +1,397 @@
1
+		GNU Free Documentation License
2
+		  Version 1.2, November 2002
3
+
4
+
5
+ Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
6
+     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
7
+ Everyone is permitted to copy and distribute verbatim copies
8
+ of this license document, but changing it is not allowed.
9
+
10
+
11
+0. PREAMBLE
12
+
13
+The purpose of this License is to make a manual, textbook, or other
14
+functional and useful document "free" in the sense of freedom: to
15
+assure everyone the effective freedom to copy and redistribute it,
16
+with or without modifying it, either commercially or noncommercially.
17
+Secondarily, this License preserves for the author and publisher a way
18
+to get credit for their work, while not being considered responsible
19
+for modifications made by others.
20
+
21
+This License is a kind of "copyleft", which means that derivative
22
+works of the document must themselves be free in the same sense.  It
23
+complements the GNU General Public License, which is a copyleft
24
+license designed for free software.
25
+
26
+We have designed this License in order to use it for manuals for free
27
+software, because free software needs free documentation: a free
28
+program should come with manuals providing the same freedoms that the
29
+software does.  But this License is not limited to software manuals;
30
+it can be used for any textual work, regardless of subject matter or
31
+whether it is published as a printed book.  We recommend this License
32
+principally for works whose purpose is instruction or reference.
33
+
34
+
35
+1. APPLICABILITY AND DEFINITIONS
36
+
37
+This License applies to any manual or other work, in any medium, that
38
+contains a notice placed by the copyright holder saying it can be
39
+distributed under the terms of this License.  Such a notice grants a
40
+world-wide, royalty-free license, unlimited in duration, to use that
41
+work under the conditions stated herein.  The "Document", below,
42
+refers to any such manual or work.  Any member of the public is a
43
+licensee, and is addressed as "you".  You accept the license if you
44
+copy, modify or distribute the work in a way requiring permission
45
+under copyright law.
46
+
47
+A "Modified Version" of the Document means any work containing the
48
+Document or a portion of it, either copied verbatim, or with
49
+modifications and/or translated into another language.
50
+
51
+A "Secondary Section" is a named appendix or a front-matter section of
52
+the Document that deals exclusively with the relationship of the
53
+publishers or authors of the Document to the Document's overall subject
54
+(or to related matters) and contains nothing that could fall directly
55
+within that overall subject.  (Thus, if the Document is in part a
56
+textbook of mathematics, a Secondary Section may not explain any
57
+mathematics.)  The relationship could be a matter of historical
58
+connection with the subject or with related matters, or of legal,
59
+commercial, philosophical, ethical or political position regarding
60
+them.
61
+
62
+The "Invariant Sections" are certain Secondary Sections whose titles
63
+are designated, as being those of Invariant Sections, in the notice
64
+that says that the Document is released under this License.  If a
65
+section does not fit the above definition of Secondary then it is not
66
+allowed to be designated as Invariant.  The Document may contain zero
67
+Invariant Sections.  If the Document does not identify any Invariant
68
+Sections then there are none.
69
+
70
+The "Cover Texts" are certain short passages of text that are listed,
71
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
72
+the Document is released under this License.  A Front-Cover Text may
73
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
74
+
75
+A "Transparent" copy of the Document means a machine-readable copy,
76
+represented in a format whose specification is available to the
77
+general public, that is suitable for revising the document
78
+straightforwardly with generic text editors or (for images composed of
79
+pixels) generic paint programs or (for drawings) some widely available
80
+drawing editor, and that is suitable for input to text formatters or
81
+for automatic translation to a variety of formats suitable for input
82
+to text formatters.  A copy made in an otherwise Transparent file
83
+format whose markup, or absence of markup, has been arranged to thwart
84
+or discourage subsequent modification by readers is not Transparent.
85
+An image format is not Transparent if used for any substantial amount
86
+of text.  A copy that is not "Transparent" is called "Opaque".
87
+
88
+Examples of suitable formats for Transparent copies include plain
89
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
90
+or XML using a publicly available DTD, and standard-conforming simple
91
+HTML, PostScript or PDF designed for human modification.  Examples of
92
+transparent image formats include PNG, XCF and JPG.  Opaque formats
93
+include proprietary formats that can be read and edited only by
94
+proprietary word processors, SGML or XML for which the DTD and/or
95
+processing tools are not generally available, and the
96
+machine-generated HTML, PostScript or PDF produced by some word
97
+processors for output purposes only.
98
+
99
+The "Title Page" means, for a printed book, the title page itself,
100
+plus such following pages as are needed to hold, legibly, the material
101
+this License requires to appear in the title page.  For works in
102
+formats which do not have any title page as such, "Title Page" means
103
+the text near the most prominent appearance of the work's title,
104
+preceding the beginning of the body of the text.
105
+
106
+A section "Entitled XYZ" means a named subunit of the Document whose
107
+title either is precisely XYZ or contains XYZ in parentheses following
108
+text that translates XYZ in another language.  (Here XYZ stands for a
109
+specific section name mentioned below, such as "Acknowledgements",
110
+"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
111
+of such a section when you modify the Document means that it remains a
112
+section "Entitled XYZ" according to this definition.
113
+
114
+The Document may include Warranty Disclaimers next to the notice which
115
+states that this License applies to the Document.  These Warranty
116
+Disclaimers are considered to be included by reference in this
117
+License, but only as regards disclaiming warranties: any other
118
+implication that these Warranty Disclaimers may have is void and has
119
+no effect on the meaning of this License.
120
+
121
+
122
+2. VERBATIM COPYING
123
+
124
+You may copy and distribute the Document in any medium, either
125
+commercially or noncommercially, provided that this License, the
126
+copyright notices, and the license notice saying this License applies
127
+to the Document are reproduced in all copies, and that you add no other
128
+conditions whatsoever to those of this License.  You may not use
129
+technical measures to obstruct or control the reading or further
130
+copying of the copies you make or distribute.  However, you may accept
131
+compensation in exchange for copies.  If you distribute a large enough
132
+number of copies you must also follow the conditions in section 3.
133
+
134
+You may also lend copies, under the same conditions stated above, and
135
+you may publicly display copies.
136
+
137
+
138
+3. COPYING IN QUANTITY
139
+
140
+If you publish printed copies (or copies in media that commonly have
141
+printed covers) of the Document, numbering more than 100, and the
142
+Document's license notice requires Cover Texts, you must enclose the
143
+copies in covers that carry, clearly and legibly, all these Cover
144
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
145
+the back cover.  Both covers must also clearly and legibly identify
146
+you as the publisher of these copies.  The front cover must present
147
+the full title with all words of the title equally prominent and
148
+visible.  You may add other material on the covers in addition.
149
+Copying with changes limited to the covers, as long as they preserve
150
+the title of the Document and satisfy these conditions, can be treated
151
+as verbatim copying in other respects.
152
+
153
+If the required texts for either cover are too voluminous to fit
154
+legibly, you should put the first ones listed (as many as fit
155
+reasonably) on the actual cover, and continue the rest onto adjacent
156
+pages.
157
+
158
+If you publish or distribute Opaque copies of the Document numbering
159
+more than 100, you must either include a machine-readable Transparent
160
+copy along with each Opaque copy, or state in or with each Opaque copy
161
+a computer-network location from which the general network-using
162
+public has access to download using public-standard network protocols
163
+a complete Transparent copy of the Document, free of added material.
164
+If you use the latter option, you must take reasonably prudent steps,
165
+when you begin distribution of Opaque copies in quantity, to ensure
166
+that this Transparent copy will remain thus accessible at the stated
167
+location until at least one year after the last time you distribute an
168
+Opaque copy (directly or through your agents or retailers) of that
169
+edition to the public.
170
+
171
+It is requested, but not required, that you contact the authors of the
172
+Document well before redistributing any large number of copies, to give
173
+them a chance to provide you with an updated version of the Document.
174
+
175
+
176
+4. MODIFICATIONS
177
+
178
+You may copy and distribute a Modified Version of the Document under
179
+the conditions of sections 2 and 3 above, provided that you release
180
+the Modified Version under precisely this License, with the Modified
181
+Version filling the role of the Document, thus licensing distribution
182
+and modification of the Modified Version to whoever possesses a copy
183
+of it.  In addition, you must do these things in the Modified Version:
184
+
185
+A. Use in the Title Page (and on the covers, if any) a title distinct
186
+   from that of the Document, and from those of previous versions
187
+   (which should, if there were any, be listed in the History section
188
+   of the Document).  You may use the same title as a previous version
189
+   if the original publisher of that version gives permission.
190
+B. List on the Title Page, as authors, one or more persons or entities
191
+   responsible for authorship of the modifications in the Modified
192
+   Version, together with at least five of the principal authors of the
193
+   Document (all of its principal authors, if it has fewer than five),
194
+   unless they release you from this requirement.
195
+C. State on the Title page the name of the publisher of the
196
+   Modified Version, as the publisher.
197
+D. Preserve all the copyright notices of the Document.
198
+E. Add an appropriate copyright notice for your modifications
199
+   adjacent to the other copyright notices.
200
+F. Include, immediately after the copyright notices, a license notice
201
+   giving the public permission to use the Modified Version under the
202
+   terms of this License, in the form shown in the Addendum below.
203
+G. Preserve in that license notice the full lists of Invariant Sections
204
+   and required Cover Texts given in the Document's license notice.
205
+H. Include an unaltered copy of this License.
206
+I. Preserve the section Entitled "History", Preserve its Title, and add
207
+   to it an item stating at least the title, year, new authors, and
208
+   publisher of the Modified Version as given on the Title Page.  If
209
+   there is no section Entitled "History" in the Document, create one
210
+   stating the title, year, authors, and publisher of the Document as
211
+   given on its Title Page, then add an item describing the Modified
212
+   Version as stated in the previous sentence.
213
+J. Preserve the network location, if any, given in the Document for
214
+   public access to a Transparent copy of the Document, and likewise
215
+   the network locations given in the Document for previous versions
216
+   it was based on.  These may be placed in the "History" section.
217
+   You may omit a network location for a work that was published at
218
+   least four years before the Document itself, or if the original
219
+   publisher of the version it refers to gives permission.
220
+K. For any section Entitled "Acknowledgements" or "Dedications",
221
+   Preserve the Title of the section, and preserve in the section all
222
+   the substance and tone of each of the contributor acknowledgements
223
+   and/or dedications given therein.
224
+L. Preserve all the Invariant Sections of the Document,
225
+   unaltered in their text and in their titles.  Section numbers
226
+   or the equivalent are not considered part of the section titles.
227
+M. Delete any section Entitled "Endorsements".  Such a section
228
+   may not be included in the Modified Version.
229
+N. Do not retitle any existing section to be Entitled "Endorsements"
230
+   or to conflict in title with any Invariant Section.
231
+O. Preserve any Warranty Disclaimers.
232
+
233
+If the Modified Version includes new front-matter sections or
234
+appendices that qualify as Secondary Sections and contain no material
235
+copied from the Document, you may at your option designate some or all
236
+of these sections as invariant.  To do this, add their titles to the
237
+list of Invariant Sections in the Modified Version's license notice.
238
+These titles must be distinct from any other section titles.
239
+
240
+You may add a section Entitled "Endorsements", provided it contains
241
+nothing but endorsements of your Modified Version by various
242
+parties--for example, statements of peer review or that the text has
243
+been approved by an organization as the authoritative definition of a
244
+standard.
245
+
246
+You may add a passage of up to five words as a Front-Cover Text, and a
247
+passage of up to 25 words as a Back-Cover Text, to the end of the list
248
+of Cover Texts in the Modified Version.  Only one passage of
249
+Front-Cover Text and one of Back-Cover Text may be added by (or
250
+through arrangements made by) any one entity.  If the Document already
251
+includes a cover text for the same cover, previously added by you or
252
+by arrangement made by the same entity you are acting on behalf of,
253
+you may not add another; but you may replace the old one, on explicit
254
+permission from the previous publisher that added the old one.
255
+
256
+The author(s) and publisher(s) of the Document do not by this License
257
+give permission to use their names for publicity for or to assert or
258
+imply endorsement of any Modified Version.
259
+
260
+
261
+5. COMBINING DOCUMENTS
262
+
263
+You may combine the Document with other documents released under this
264
+License, under the terms defined in section 4 above for modified
265
+versions, provided that you include in the combination all of the
266
+Invariant Sections of all of the original documents, unmodified, and
267
+list them all as Invariant Sections of your combined work in its
268
+license notice, and that you preserve all their Warranty Disclaimers.
269
+
270
+The combined work need only contain one copy of this License, and
271
+multiple identical Invariant Sections may be replaced with a single
272
+copy.  If there are multiple Invariant Sections with the same name but
273
+different contents, make the title of each such section unique by
274
+adding at the end of it, in parentheses, the name of the original
275
+author or publisher of that section if known, or else a unique number.
276
+Make the same adjustment to the section titles in the list of
277
+Invariant Sections in the license notice of the combined work.
278
+
279
+In the combination, you must combine any sections Entitled "History"
280
+in the various original documents, forming one section Entitled
281
+"History"; likewise combine any sections Entitled "Acknowledgements",
282
+and any sections Entitled "Dedications".  You must delete all sections
283
+Entitled "Endorsements".
284
+
285
+
286
+6. COLLECTIONS OF DOCUMENTS
287
+
288
+You may make a collection consisting of the Document and other documents
289
+released under this License, and replace the individual copies of this
290
+License in the various documents with a single copy that is included in
291
+the collection, provided that you follow the rules of this License for
292
+verbatim copying of each of the documents in all other respects.
293
+
294
+You may extract a single document from such a collection, and distribute
295
+it individually under this License, provided you insert a copy of this
296
+License into the extracted document, and follow this License in all
297
+other respects regarding verbatim copying of that document.
298
+
299
+
300
+7. AGGREGATION WITH INDEPENDENT WORKS
301
+
302
+A compilation of the Document or its derivatives with other separate
303
+and independent documents or works, in or on a volume of a storage or
304
+distribution medium, is called an "aggregate" if the copyright
305
+resulting from the compilation is not used to limit the legal rights
306
+of the compilation's users beyond what the individual works permit.
307
+When the Document is included in an aggregate, this License does not
308
+apply to the other works in the aggregate which are not themselves
309
+derivative works of the Document.
310
+
311
+If the Cover Text requirement of section 3 is applicable to these
312
+copies of the Document, then if the Document is less than one half of
313
+the entire aggregate, the Document's Cover Texts may be placed on
314
+covers that bracket the Document within the aggregate, or the
315
+electronic equivalent of covers if the Document is in electronic form.
316
+Otherwise they must appear on printed covers that bracket the whole
317
+aggregate.
318
+
319
+
320
+8. TRANSLATION
321
+
322
+Translation is considered a kind of modification, so you may
323
+distribute translations of the Document under the terms of section 4.
324
+Replacing Invariant Sections with translations requires special
325
+permission from their copyright holders, but you may include
326
+translations of some or all Invariant Sections in addition to the
327
+original versions of these Invariant Sections.  You may include a
328
+translation of this License, and all the license notices in the
329
+Document, and any Warranty Disclaimers, provided that you also include
330
+the original English version of this License and the original versions
331
+of those notices and disclaimers.  In case of a disagreement between
332
+the translation and the original version of this License or a notice
333
+or disclaimer, the original version will prevail.
334
+
335
+If a section in the Document is Entitled "Acknowledgements",
336
+"Dedications", or "History", the requirement (section 4) to Preserve
337
+its Title (section 1) will typically require changing the actual
338
+title.
339
+
340
+
341
+9. TERMINATION
342
+
343
+You may not copy, modify, sublicense, or distribute the Document except
344
+as expressly provided for under this License.  Any other attempt to
345
+copy, modify, sublicense or distribute the Document is void, and will
346
+automatically terminate your rights under this License.  However,
347
+parties who have received copies, or rights, from you under this
348
+License will not have their licenses terminated so long as such
349
+parties remain in full compliance.
350
+
351
+
352
+10. FUTURE REVISIONS OF THIS LICENSE
353
+
354
+The Free Software Foundation may publish new, revised versions
355
+of the GNU Free Documentation License from time to time.  Such new
356
+versions will be similar in spirit to the present version, but may
357
+differ in detail to address new problems or concerns.  See
358
+http://www.gnu.org/copyleft/.
359
+
360
+Each version of the License is given a distinguishing version number.
361
+If the Document specifies that a particular numbered version of this
362
+License "or any later version" applies to it, you have the option of
363
+following the terms and conditions either of that specified version or
364
+of any later version that has been published (not as a draft) by the
365
+Free Software Foundation.  If the Document does not specify a version
366
+number of this License, you may choose any version ever published (not
367
+as a draft) by the Free Software Foundation.
368
+
369
+
370
+ADDENDUM: How to use this License for your documents
371
+
372
+To use this License in a document you have written, include a copy of
373
+the License in the document and put the following copyright and
374
+license notices just after the title page:
375
+
376
+    Copyright (c)  YEAR  YOUR NAME.
377
+    Permission is granted to copy, distribute and/or modify this document
378
+    under the terms of the GNU Free Documentation License, Version 1.2
379
+    or any later version published by the Free Software Foundation;
380
+    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
381
+    A copy of the license is included in the section entitled "GNU
382
+    Free Documentation License".
383
+
384
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
385
+replace the "with...Texts." line with this:
386
+
387
+    with the Invariant Sections being LIST THEIR TITLES, with the
388
+    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
389
+
390
+If you have Invariant Sections without Cover Texts, or some other
391
+combination of the three, merge those two alternatives to suit the
392
+situation.
393
+
394
+If your document contains nontrivial examples of program code, we
395
+recommend releasing these examples in parallel under your choice of
396
+free software license, such as the GNU General Public License,
397
+to permit their use in free software.

+ 176
- 0
INSTALL View File

@@ -0,0 +1,176 @@
1
+Basic Installation
2
+==================
3
+
4
+   These are generic installation instructions.
5
+
6
+   The `configure' shell script attempts to guess correct values for
7
+various system-dependent variables used during compilation.  It uses
8
+those values to create a `Makefile' in each directory of the package.
9
+It may also create one or more `.h' files containing system-dependent
10
+definitions.  Finally, it creates a shell script `config.status' that
11
+you can run in the future to recreate the current configuration, a file
12
+`config.cache' that saves the results of its tests to speed up
13
+reconfiguring, and a file `config.log' containing compiler output
14
+(useful mainly for debugging `configure').
15
+
16
+   If you need to do unusual things to compile the package, please try
17
+to figure out how `configure' could check whether to do them, and mail
18
+diffs or instructions to the address given in the `README' so they can
19
+be considered for the next release.  If at some point `config.cache'
20
+contains results you don't want to keep, you may remove or edit it.
21
+
22
+   The file `configure.in' is used to create `configure' by a program
23
+called `autoconf'.  You only need `configure.in' if you want to change
24
+it or regenerate `configure' using a newer version of `autoconf'.
25
+
26
+The simplest way to compile this package is:
27
+
28
+  1. `cd' to the directory containing the package's source code and type
29
+     `./configure' to configure the package for your system.  If you're
30
+     using `csh' on an old version of System V, you might need to type
31
+     `sh ./configure' instead to prevent `csh' from trying to execute
32
+     `configure' itself.
33
+
34
+     Running `configure' takes a while.  While running, it prints some
35
+     messages telling which features it is checking for.
36
+
37
+  2. Type `make' to compile the package.
38
+
39
+  3. Optionally, type `make check' to run any self-tests that come with
40
+     the package.
41
+
42
+  4. Type `make install' to install the programs and any data files and
43
+     documentation.
44
+
45
+  5. You can remove the program binaries and object files from the
46
+     source code directory by typing `make clean'.  To also remove the
47
+     files that `configure' created (so you can compile the package for
48
+     a different kind of computer), type `make distclean'.  There is
49
+     also a `make maintainer-clean' target, but that is intended mainly
50
+     for the package's developers.  If you use it, you may have to get
51
+     all sorts of other programs in order to regenerate files that came
52
+     with the distribution.
53
+
54
+Compilers and Options
55
+=====================
56
+
57
+   Some systems require unusual options for compilation or linking that
58
+the `configure' script does not know about.  You can give `configure'
59
+initial values for variables by setting them in the environment.  Using
60
+a Bourne-compatible shell, you can do that on the command line like
61
+this:
62
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
63
+
64
+Or on systems that have the `env' program, you can do it like this:
65
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
66
+
67
+Compiling For Multiple Architectures
68
+====================================
69
+
70
+   You can compile the package for more than one kind of computer at the
71
+same time, by placing the object files for each architecture in their
72
+own directory.  To do this, you must use a version of `make' that
73
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
74
+directory where you want the object files and executables to go and run
75
+the `configure' script.  `configure' automatically checks for the
76
+source code in the directory that `configure' is in and in `..'.
77
+
78
+   If you have to use a `make' that does not supports the `VPATH'
79
+variable, you have to compile the package for one architecture at a time
80
+in the source code directory.  After you have installed the package for
81
+one architecture, use `make distclean' before reconfiguring for another
82
+architecture.
83
+
84
+Installation Names
85
+==================
86
+
87
+   By default, `make install' will install the package's files in
88
+`/usr/local/kde/bin', `/usr/local/kde/lib', etc.  You can specify an
89
+installation prefix other than `/usr/local/kde' by giving `configure'
90
+the option `--prefix=PATH'.
91
+
92
+   You can specify separate installation prefixes for
93
+architecture-specific files and architecture-independent files.  If you
94
+give `configure' the option `--exec-prefix=PATH', the package will use
95
+PATH as the prefix for installing programs and libraries.
96
+Documentation and other data files will still use the regular prefix.
97
+
98
+   If the package supports it, you can cause programs to be installed
99
+with an extra prefix or suffix on their names by giving `configure' the
100
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
101
+
102
+Optional Features
103
+=================
104
+
105
+   Some packages pay attention to `--enable-FEATURE' options to
106
+`configure', where FEATURE indicates an optional part of the package.
107
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
108
+is something like `gnu-as' or `x' (for the X Window System).  The
109
+`README' should mention any `--enable-' and `--with-' options that the
110
+package recognizes.
111
+
112
+   For packages that use the X Window System, `configure' can usually
113
+find the X include and library files automatically, but if it doesn't,
114
+you can use the `configure' options `--x-includes=DIR' and
115
+`--x-libraries=DIR' to specify their locations.
116
+
117
+Specifying the System Type
118
+==========================
119
+
120
+   There may be some features `configure' can not figure out
121
+automatically, but needs to determine by the type of host the package
122
+will run on.  Usually `configure' can figure that out, but if it prints
123
+a message saying it can not guess the host type, give it the
124
+`--host=TYPE' option.  TYPE can either be a short name for the system
125
+type, such as `sun4', or a canonical name with three fields:
126
+     CPU-COMPANY-SYSTEM
127
+
128
+See the file `config.sub' for the possible values of each field.  If
129
+`config.sub' isn't included in this package, then this package doesn't
130
+need to know the host type.
131
+
132
+   If you are building compiler tools for cross-compiling, you can also
133
+use the `--target=TYPE' option to select the type of system they will
134
+produce code for and the `--build=TYPE' option to select the type of
135
+system on which you are compiling the package.
136
+
137
+Sharing Defaults
138
+================
139
+
140
+   If you want to set default values for `configure' scripts to share,
141
+you can create a site shell script called `config.site' that gives
142
+default values for variables like `CC', `cache_file', and `prefix'.
143
+`configure' looks for `PREFIX/share/config.site' if it exists, then
144
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
145
+`CONFIG_SITE' environment variable to the location of the site script.
146
+A warning: not all `configure' scripts look for a site script.
147
+
148
+Operation Controls
149
+==================
150
+
151
+   `configure' recognizes the following options to control how it
152
+operates.
153
+
154
+`--cache-file=FILE'
155
+     Use and save the results of the tests in FILE instead of
156
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
157
+     debugging `configure'.
158
+
159
+`--help'
160
+     Print a summary of the options to `configure', and exit.
161
+
162
+`--quiet'
163
+`--silent'
164
+`-q'
165
+     Do not print messages saying which checks are being made.
166
+
167
+`--srcdir=DIR'
168
+     Look for the package's source code in directory DIR.  Usually
169
+     `configure' can determine that directory automatically.
170
+
171
+`--version'
172
+     Print the version of Autoconf used to generate the `configure'
173
+     script, and exit.
174
+
175
+`configure' also accepts some other, not widely useful, options.
176
+

+ 12
- 0
Mainpage.dox View File

@@ -0,0 +1,12 @@
1
+/** @mainpage KDENetwork
2
+*
3
+* KDENetwork is a collection of applications that
4
+* are network-oriented. This means that there
5
+* are mostly communications applications in here,
6
+* as well as some file-transfer things.
7
+*
8
+*
9
+* - Kopete is a multi-protocol instant message client.
10
+* - KSirc is an IRC client (i.e. single-protocol IM client).
11
+*
12
+*/

+ 10
- 0
Makefile.am.in View File

@@ -0,0 +1,10 @@
1
+AUTOMAKE_OPTIONS = foreign 1.6.1
2
+DISTCLEANFILES = inst-apps 
3
+COMPILE_BEFORE_dcoprss= librss
4
+COMPILE_BEFORE_knewsticker= librss
5
+
6
+MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 SUBDIRS
7
+
8
+include admin/deps.am
9
+include admin/Doxyfile.am
10
+

+ 16
- 0
Makefile.cvs View File

@@ -0,0 +1,16 @@
1
+
2
+all: 
3
+	@echo "This Makefile is only for the CVS repository"
4
+	@echo "This will be deleted before making the distribution"
5
+	@echo ""
6
+	@if test ! -d admin; then \
7
+	   echo "Please recheckout this module!" ;\
8
+	   echo "for cvs: use checkout once and after that update again" ;\
9
+	   echo "for cvsup: checkout kde-common from cvsup and" ;\
10
+	   echo "   link kde-common/admin to ./admin" ;\
11
+	   exit 1 ;\
12
+	fi
13
+	$(MAKE) -f admin/Makefile.common cvs
14
+
15
+.SILENT:
16
+

+ 45
- 0
README View File

@@ -0,0 +1,45 @@
1
+In this file:
2
+
3
+* Common Mistakes
4
+* Debugging
5
+* More Info
6
+
7
+What it is
8
+----------
9
+
10
+* kdict: graphical client for the DICT protocol.
11
+* kit: AOL instant messenger client, using the TOC protocol
12
+* knewsticker: RDF newsticker applet
13
+* kpf: public fileserver applet
14
+* kppp: dialer and front end for pppd
15
+* ksirc: IRC client
16
+* ktalkd: talk daemon
17
+* kxmlrpc: KDE XmlRpc Daemon
18
+* lanbrowsing: lan browsing kio slave
19
+* krfb: Desktop Sharing server, allow others to access your desktop via VNC
20
+* krdc: a client for Desktop Sharing and other VNC servers
21
+* wifi: Wireless LAN tools
22
+
23
+Common Mistakes
24
+---------------
25
+
26
+If configure claims Qt cannot be found, have a look at ftp://ftp.trolltech.com
27
+and download the latest Qt 3.3.x release.
28
+
29
+Debugging
30
+---------
31
+
32
+You can use --enable-debug with the configure script, if you want to have
33
+debug code in your KDE apps and libs.  I recommend to do this, since this
34
+is alpha software and this makes debugging things a whole lot easier.
35
+
36
+More Info
37
+---------
38
+
39
+Have a look at the individual subdirectories, if you want to know, what
40
+versions of apps are included.
41
+
42
+Please direct any bug reports to our bug list by visiting
43
+http://bugs.kde.org.
44
+
45
+General KDE discussions should go to the KDE mailing list (kde@kde.org).

+ 69
- 0
configure.in.bot View File

@@ -0,0 +1,69 @@
1
+if test -z "$LIB_SLP"; then
2
+   echo ""
3
+   echo "You're missing OpenSLP, or the OpenSLP devel package."
4
+   echo "Browsing in krfb and krdc will not be possible."
5
+   echo "If you want browsing support in krfb, you should consider"
6
+   echo "installing it. "
7
+   echo "Have a look at http://www.openslp.org/ or find a binary"
8
+   echo "package for your platform."
9
+   echo ""
10
+   all_tests=bad
11
+fi
12
+
13
+if test "$have_ssl" != yes; then
14
+  echo ""
15
+  echo "You're missing openSSL, or your version is too old (before 0.9.5a)."
16
+  echo "krdc will not be compiled. If you want to use krdc, you should consider"
17
+  echo "installing or upgrading it."
18
+  echo "Have a look at http://www.openssl.org, or find a binary package for"
19
+  echo "your platform."
20
+  echo ""
21
+  all_tests=bad
22
+fi
23
+
24
+if test -z "$COMPILE_GADU"; then
25
+  echo ""
26
+  echo "You're missing libgadu or the libgadu development package."
27
+  echo "Kopete's Gadu-Gadu plugin will not be compiled."
28
+  echo "If you want Gadu-Gadu, a Polish messaging protocol, support in Kopete"
29
+  echo "you can download it from http://dev.null.pl/ekg/ or find a binary"
30
+  echo "package for your platform."
31
+  echo "You can find more information in ./kopete/protocols/gadu/README.gadu ."
32
+  echo ""
33
+  all_tests=bad
34
+fi
35
+
36
+if test "X$have_libidn" = Xno; then
37
+  echo ""
38
+  echo "You're missing libidn or the libidn development package"
39
+  echo "Kopete's Jabber plugin will not be compiled."
40
+  echo "If you want Jabber support in Kopete, You can download libidn from"
41
+  echo "http://www.gnu.org/software/libidn or find a binary package"
42
+  echo "for your platform."
43
+  all_tests=bad
44
+fi
45
+
46
+
47
+if test "x$with_xmms" = xcheck && test -z "$XMMS_LIBS"; then
48
+  echo ""
49
+  echo "You're missing the XMMS libraries, or the libxmms development package."
50
+  echo "Without libxmms Kopete's NowListening plugin won't be able to talk to"
51
+  echo "the XMMS music player. If you want Kopete's NowListening plugin to"
52
+  echo "support XMMS, have a look at http://www.xmms.org/ or find a"
53
+  echo "binary package for your system."
54
+  echo ""
55
+  all_tests=bad
56
+fi
57
+
58
+if test "x$with_wifi" = xcheck && test "$kde_libiw_installed" = "no"; then
59
+  echo ""
60
+  echo "You're missing the wireless tools libraries, or the wireless tools"
61
+  echo "header files. Without these, KWiFiManager and the kwireless applet"
62
+  echo "will not be compiled. You are unable to monitor wireless LAN"
63
+  echo "connections without these. If you want wireless LAN support enabled," 
64
+  echo "have a look at "
65
+  echo "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
66
+  echo "or find a binary package for your system."
67
+  echo ""
68
+  all_tests=bad
69
+fi

+ 129
- 0
configure.in.in View File

@@ -0,0 +1,129 @@
1
+#MIN_CONFIG
2
+KDE_ENABLE_HIDDEN_VISIBILITY
3
+KDE_INIT_DOXYGEN([KDE Network API Reference], [Version $VERSION])
4
+
5
+
6
+dnl Checks for header files.
7
+AC_CHECK_HEADERS(linux/tcp.h linux/if_ppp.h)
8
+AC_CHECK_HEADERS(net/errno.h net/if_ppp.h)
9
+AC_CHECK_HEADERS(asm/param.h)
10
+AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h sys/cdefs.h sys/sockio.h)
11
+AC_CHECK_HEADERS(fcntl.h unistd.h fnmatch.h sysent.h strings.h paths.h)
12
+AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h byteswap.h)
13
+AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])
14
+
15
+
16
+AC_SYS_LARGEFILE
17
+if test "$ac_cv_sys_file_offset_bits" != no; then
18
+  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
19
+fi
20
+
21
+if test "x$ac_cv_sys_large_files" != "xno"; then
22
+  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
23
+fi
24
+
25
+AC_CHECK_FUNCS(flock)
26
+AC_CHECK_USLEEP
27
+
28
+dnl Checks for library functions.
29
+AC_CHECK_FUNCS(socket fabsl strdup vsnprintf tzset)
30
+AC_CHECK_SETENV
31
+AC_CHECK_UNSETENV
32
+AC_CHECK_GETDOMAINNAME
33
+AC_CHECK_GETHOSTNAME
34
+AC_C_BIGENDIAN
35
+
36
+AC_CHECK_FUNC(res_init)
37
+if test "$ac_cv_func_res_init" = no; then
38
+  AC_CHECK_LIB(resolv, res_init, LIBRESOLV="-lresolv $LIBSOCKET", , $LIBSOCKET)
39
+fi
40
+AC_SUBST(LIBRESOLV)
41
+
42
+AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
43
+	AC_TRY_COMPILE([
44
+		#include <time.h>
45
+	], [
46
+		timezone = 1;
47
+	], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
48
+if test $ac_cv_var_timezone = yes; then
49
+	AC_DEFINE(HAVE_TIMEZONE, 1, [define if you have a timezone variable])
50
+fi
51
+AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,	
52
+	AC_TRY_COMPILE([
53
+		#include <time.h>
54
+	], [
55
+		struct tm tm;
56
+		tm.tm_gmtoff = 1;
57
+	], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
58
+if test $ac_cv_struct_tm_gmtoff = yes; then
59
+	AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
60
+fi
61
+
62
+# check for SLP
63
+dnl define the configure option that disables slp
64
+AC_ARG_ENABLE(slp, [  --disable-slp     don't require libslp (Browsing in krfb and krdc not possible) ],  with_slp=$enableval, with_slp=yes)
65
+if test "$with_slp" = "yes"; then
66
+AC_MSG_CHECKING(for SLP support)
67
+save_slptest_LIBS="$LIBS"
68
+save_slptest_LDFLAGS="$LDFLAGS"
69
+save_slptest_CPPFLAGS="$CPPFLAGS"
70
+LDFLAGS="$all_libraries $LDFLAGS"
71
+CPPFLAGS="$CPPFLAGS $all_includes"
72
+LIBS="-lslp"
73
+AC_TRY_LINK(	[
74
+			#include <slp.h>
75
+		],[
76
+			SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
77
+		],[
78
+			AC_DEFINE(HAVE_SLP,1,[Define if SLP is available])
79
+                        LIB_SLP="-lslp"
80
+			AC_MSG_RESULT(yes)
81
+		],[
82
+			AC_MSG_RESULT(no)
83
+                        LIB_SLP=""
84
+])
85
+CPPFLAGS=$save_slptest_CPPFLAGS
86
+LDFLAGS=$save_slptest_LDFLAGS
87
+LIBS=$save_slptest_LIBS
88
+fi
89
+AC_SUBST(LIB_SLP)
90
+
91
+KDE_CHECK_THREADING
92
+
93
+dnl For apps that NEED threads
94
+if test -z "$LIBPTHREAD" && test -z "$USE_THREADS"; then
95
+  DO_NOT_COMPILE="$DO_NOT_COMPILE kdict krfb krdc"
96
+fi
97
+CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
98
+
99
+AH_VERBATIM(_osf_config_h,
100
+[
101
+#ifdef __osf__
102
+/* From Tom Leitner */
103
+#if __STDC__
104
+#include <stdarg.h>
105
+#include <stdlib.h>
106
+#else
107
+#include <varargs.h>
108
+#endif
109
+#ifndef __OSF_INCLUDED__
110
+#define __OSF_INCLUDED__
111
+#define MSG_NOSIGNAL 0
112
+#ifndef AF_LOCAL
113
+#define AF_LOCAL 1          /* is the same as AF_UNIX */
114
+#endif
115
+#ifndef herror
116
+#define herror(a)   printf(a)
117
+#endif
118
+
119
+#include <sys/types.h>
120
+#ifdef __cplusplus
121
+extern "C" int sethostname (char *name, int name_len );
122
+extern "C" int flock(int filedes, int operation );
123
+#else
124
+int sethostname (char *name, int name_len );
125
+int flock(int filedes, int operation );
126
+#endif
127
+#endif
128
+#endif
129
+])

+ 28
- 0
dcoprss/Makefile.am View File

@@ -0,0 +1,28 @@
1
+bin_PROGRAMS = rssservice rssclient feedbrowser
2
+INCLUDES = -I$(top_srcdir) $(all_includes)
3
+
4
+rssservice_LDFLAGS = $(KDE_RPATH) $(all_libraries)
5
+rssservice_LDADD = $(LIB_KIO) ../librss/librss.la
6
+rssservice_SOURCES = main.cpp service.cpp query.cpp document.cpp article.cpp query.skel service.skel xmlrpciface.cpp cache.cpp
7
+
8
+
9
+# client stuff
10
+rssclient_LDFLAGS = $(KDE_RPATH) $(all_libraries)
11
+rssclient_LDADD   = $(LIB_KDECORE)
12
+rssclient_SOURCES = client.cpp
13
+
14
+feedbrowser_LDFLAGS = $(KDE_RPATH) $(all_libraries)
15
+feedbrowser_LDADD = $(LIB_KDEUI)
16
+feedbrowser_SOURCES = feedbrowser.skel feedbrowser.cpp
17
+
18
+noinst_HEADERS = service.h query.h xmlrpciface.h cache.h
19
+
20
+METASOURCES = AUTO
21
+
22
+messages: rc.cpp
23
+	$(XGETTEXT) *.cpp -o $(podir)/dcoprss.pot
24
+
25
+
26
+service_DATA = rssservice.desktop
27
+servicedir = $(kde_servicesdir)
28
+

+ 49
- 0
dcoprss/article.cpp View File

@@ -0,0 +1,49 @@
1
+/* $Id$ */
2
+/***************************************************************************
3
+                          article.cpp  -  A DCOP Service to provide RSS data
4
+                             -------------------
5
+    begin                : Saturday 15 February 2003
6
+    copyright            : (C) 2003 by Ian Reinhart Geiser
7
+    email                : geiseri@kde.org
8
+ ***************************************************************************/
9
+
10
+/***************************************************************************
11
+ *                                                                         *
12
+ *   This program is free software; you can redistribute it and/or modify  *
13
+ *   it under the terms of the GNU General Public License as published by  *
14
+ *   the Free Software Foundation; either version 2 of the License, or     *
15
+ *   (at your option) any later version.                                   *
16
+ *                                                                         *
17
+ ***************************************************************************/
18
+#include <kdebug.h>
19
+#include <kurl.h>
20
+#include "service.h"
21
+
22
+RSSArticle::RSSArticle(Article *art) :
23
+	DCOPObject(), m_Art(art)
24
+{
25
+	kdDebug() << "New article..." << endl;
26
+	kdDebug() << m_Art->link().prettyURL() << endl;
27
+}
28
+
29
+RSSArticle::~RSSArticle()
30
+{
31
+	kdDebug() << "Article going away..." << endl;
32
+	delete m_Art;
33
+}
34
+
35
+QString RSSArticle::title()
36
+{
37
+	//kdDebug() << "Get title " <<  m_Art->title() << endl;
38
+	return m_Art->title();
39
+}
40
+
41
+QString RSSArticle::description()
42
+{
43
+	return m_Art->description();
44
+}
45
+
46
+QString RSSArticle::link()
47
+{
48
+	return m_Art->link().prettyURL();
49
+}

+ 129
- 0
dcoprss/cache.cpp View File

@@ -0,0 +1,129 @@
1
+/*
2
+ * cache.cpp - (c) 2003 Frerich Raabe <raabe@kde.org>
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ *
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ *    notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ *    notice, this list of conditions and the following disclaimer in the
12
+ *    documentation and/or other materials provided with the distribution.
13
+ *
14
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
+ */
25
+#include "cache.h"
26
+#include "xmlrpciface.h"
27
+
28
+#include <kdebug.h>
29
+#include <kstandarddirs.h>
30
+
31
+#include <qdatastream.h>
32
+#include <qfile.h>
33
+
34
+bool CacheEntry::isValid() const
35
+{
36
+	// Cache entries get invalid after on hour. One shouldn't hardcode this
37
+	// but for now it'll do.
38
+	return m_timeStamp.secsTo( QDateTime::currentDateTime() ) < 3600;
39
+}
40
+
41
+Cache *Cache::m_instance = 0;
42
+
43
+Cache &Cache::self()
44
+{
45
+	if ( !m_instance )
46
+		m_instance = new Cache;
47
+	return *m_instance;
48
+}
49
+
50
+QString Cache::getCacheKey( const QString &server, const QString &method,
51
+                            const QValueList<QVariant> &args )
52
+{
53
+	QString key;
54
+	key = server + QString::fromLatin1( "__" );
55
+	key += method + QString::fromLatin1( "__" );
56
+	QValueList<QVariant>::ConstIterator it = args.begin();
57
+	QValueList<QVariant>::ConstIterator end = args.end();
58
+	for ( ; it != end; ++it )
59
+		key += KXMLRPC::Query::marshal( *it );
60
+	
61
+	return key;
62
+}
63
+
64
+Cache::Cache()
65
+{
66
+	load();
67
+}
68
+
69
+Cache::~Cache()
70
+{
71
+	save();
72
+}
73
+
74
+void Cache::load()
75
+{
76
+	QFile file( cacheFileName() );
77
+	if ( !file.open( IO_ReadOnly ) ) {
78
+		kdDebug() << "Failed to open cache file " << cacheFileName() << endl;
79
+		return;
80
+	}
81
+	
82
+	QDataStream stream( &file );
83
+	while ( !stream.atEnd() ) {
84
+		QString key;
85
+		stream >> key;
86
+
87
+		CacheEntry *entry = new CacheEntry;
88
+		stream >> *entry;
89
+
90
+		QDict<CacheEntry>::insert( key, entry );
91
+	}
92
+}
93
+
94
+void Cache::save()
95
+{
96
+	QFile file( cacheFileName() );
97
+	if ( !file.open( IO_WriteOnly ) ) {
98
+		kdDebug() << "Failed to open cache file " << cacheFileName() << endl;
99
+		return;
100
+	}
101
+
102
+	QDataStream stream( &file );
103
+
104
+	QDictIterator<CacheEntry> it( *this );
105
+	for ( ; it.current() != 0; ++it )
106
+		stream << it.currentKey() << *it.current();
107
+}
108
+
109
+void Cache::touch( const QString &key )
110
+{
111
+	CacheEntry *entry = find( key );
112
+	if ( !entry )
113
+		return;
114
+	entry->m_timeStamp = QDateTime::currentDateTime();
115
+}
116
+
117
+void Cache::insert( const QString &key, const KXMLRPC::Query::Result &result )
118
+{
119
+	CacheEntry *entry = new CacheEntry;
120
+	entry->m_timeStamp = QDateTime::currentDateTime();
121
+	entry->m_result = result;
122
+	QDict<CacheEntry>::insert( key, entry );
123
+}
124
+
125
+QString Cache::cacheFileName() const
126
+{
127
+	return locateLocal( "appdata", "cache/dcoprss.cache" );
128
+}
129
+

+ 86
- 0
dcoprss/cache.h View File

@@ -0,0 +1,86 @@
1
+/*
2
+ * cache.h - (c) 2003 Frerich Raabe <raabe@kde.org>
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions
6
+ * are met:
7
+ *
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ *    notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ *    notice, this list of conditions and the following disclaimer in the
12
+ *    documentation and/or other materials provided with the distribution.
13
+ *
14
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
+ */
25
+#ifndef CACHE_H
26
+#define CACHE_H
27
+
28
+#include <qcstring.h>
29
+#include <qdatetime.h>
30
+#include <qdict.h>
31
+
32
+#include <xmlrpciface.h>
33
+
34
+class CacheEntry
35
+{
36
+	friend class Cache;
37
+	friend QDataStream &operator>>( QDataStream &s, CacheEntry &e );
38
+	public:
39
+		const QDateTime &timeStamp() const { return m_timeStamp; }
40
+		const KXMLRPC::Query::Result result() const { return m_result; }
41
+		bool isValid() const;
42
+	
43
+	private:
44
+		QDateTime m_timeStamp;
45
+		KXMLRPC::Query::Result m_result;
46
+};
47
+
48
+class Cache : public QDict<CacheEntry>
49
+{
50
+	public:
51
+		static Cache &self();
52
+
53
+		static QString getCacheKey( const QString &server,
54
+		                            const QString &method,
55
+		                            const QValueList<QVariant> &args );
56
+
57
+		void load();
58
+		void save();
59
+
60
+		void touch( const QString &key );
61
+
62
+		void insert( const QString &key, const KXMLRPC::Query::Result &result );
63
+
64
+	private:
65
+		Cache();
66
+		Cache( const Cache &rhs ); // disabled
67
+		Cache &operator=( const Cache &rhs ); // disabled
68
+		~Cache();
69
+
70
+		QString cacheFileName() const;
71
+
72
+		static Cache *m_instance;
73
+};
74
+
75
+inline QDataStream &operator<<( QDataStream &s, const CacheEntry &e )
76
+{
77
+	return s << e.timeStamp() << e.result();
78
+}
79
+
80
+inline QDataStream &operator>>( QDataStream &s, CacheEntry &e )
81
+{
82
+	return s >> e.m_timeStamp >> e.m_result;
83
+}
84
+
85
+#endif // CACHE_H
86
+// vim:ts=4:sw=4:noet

+ 75
- 0
dcoprss/client.cpp View File

@@ -0,0 +1,75 @@
1
+/* $Id$ */
2
+#include <kapplication.h>
3
+#include <dcopclient.h>
4
+#include <dcopref.h>
5
+#include <qdatastream.h>
6
+#include <qstring.h>
7
+#include <qstringlist.h>
8
+#include <qcstring.h>
9
+#include <kdebug.h>
10
+#include <stdlib.h>
11
+/*
12
+class rssIface : virtual public DCOPObject
13
+{
14
+	K_DCOP
15
+public:
16
+
17
+	rssIface( KApplication *app)
18
+	{
19
+		// get our DCOP client and attach so that we may use it
20
+		DCOPClient *client = app->dcopClient();
21
+		client->attach();
22
+		QString error;
23
+		QCString appID;
24
+		kdDebug() << "Looking for rss service..." << endl;
25
+		if (!client->isApplicationRegistered("rssservice"))
26
+		{
27
+			kdDebug() << "Could not find service so I am starting it..." << endl;
28
+			if(KApplication::startServiceByName("rssservice",QStringList(), &error, &appID ))
29
+			{
30
+				kdDebug() << "Starting rssservice failed with message: " << error << endl;
31
+				exit(0);
32
+			}
33
+		}
34
+		kdDebug ()<< "Accessing rssservice..." << endl;
35
+
36
+		if (!connectDCOPSignal(0,0, "documentUpdated(DCOPRef)",
37
+			"refresh(DCOPRef)",false))
38
+			kdDebug() << "Could not attach signal..." << endl;
39
+		else
40
+			kdDebug() << "attached dcop signals..." << endl;
41
+
42
+		QString url("http://freshmeat.net/backend/fm.rdf");
43
+		DCOPRef m_rssservice("rssservice","RSSService");
44
+		m_rssservice.call("load(QString)", url);
45
+		QStringList returnList = m_rssservice.call("list()");
46
+		DCOPRef doc = m_rssservice.call("document(QString)", returnList[0]);
47
+		QString title = doc.call("title()");
48
+		QString link = doc.call("link()");
49
+		QString description = doc.call("description()");
50
+		kdDebug() << title << endl;
51
+		kdDebug() << link << endl;
52
+		kdDebug() << description << endl;
53
+	}
54
+
55
+	k_dcop:
56
+	virtual void refresh(DCOPRef doc)
57
+	{
58
+		QString title = doc.call("title()");
59
+		QString link = doc.call("link()");
60
+		QString description = doc.call("description()");
61
+		kdDebug() << title << endl;
62
+		kdDebug() << link << endl;
63
+		kdDebug() << description << endl;
64
+	}
65
+
66
+	private:
67
+
68
+};
69
+*/
70
+int main(int argc, char **argv)
71
+{
72
+	KApplication *app = new KApplication(argc, argv, "client", false);
73
+
74
+	app->exec();
75
+}

+ 307
- 0
dcoprss/document.cpp View File

@@ -0,0 +1,307 @@
1
+/* $Id$ */
2
+/***************************************************************************
3
+                          document.cpp  -  A DCOP Service to provide RSS data
4
+                             -------------------
5
+    begin                : Saturday 15 February 2003
6
+    copyright            : (C) 2003 by Ian Reinhart Geiser
7
+    email                : geiseri@kde.org
8
+ ***************************************************************************/
9
+
10
+/***************************************************************************
11
+ *                                                                         *
12
+ *   This program is free software; you can redistribute it and/or modify  *
13
+ *   it under the terms of the GNU General Public License as published by  *
14
+ *   the Free Software Foundation; either version 2 of the License, or     *
15
+ *   (at your option) any later version.                                   *
16
+ *                                                                         *
17
+ ***************************************************************************/
18
+#include <kdebug.h>
19
+#include <qdatetime.h>
20
+#include <kurl.h>
21
+#include "service.h"
22
+
23
+RSSDocument::RSSDocument(const QString& url) :
24
+	QObject(), DCOPObject(), m_Url(url)
25
+{
26
+
27
+	m_list.setAutoDelete( true );
28
+	m_Doc = 0L;
29
+	m_pix = QPixmap();
30
+	m_isLoading = false;
31
+	m_maxAge = 60;
32
+	m_Timeout = QDateTime::currentDateTime();
33
+	m_state.clear();
34
+}
35
+
36
+RSSDocument::~RSSDocument()
37
+{
38
+	kdDebug() << "Document going away..." << endl;
39
+
40
+	delete m_Doc;
41
+}
42
+
43
+void RSSDocument::loadingComplete(Loader *ldr, Document doc, Status stat)
44
+{
45
+
46
+
47
+	if( m_Doc != 0L)
48
+	{
49
+		delete m_Doc;
50
+
51
+	}
52
+
53
+	if (stat != RSS::Success)
54
+	{
55
+		kdDebug() << "Document error! Loader:" << ldr->errorCode() << " Parser:" << stat << endl;
56
+
57
+		m_isLoading = false;
58
+		m_Doc = 0L;
59
+		if( stat == RSS::ParseError )
60
+			documentUpdateError(DCOPRef(this), 1);
61
+		else if( stat == RSS::RetrieveError )
62
+			documentUpdateError(DCOPRef(this), 2);
63
+		else
64
+			documentUpdateError(DCOPRef(this), 3);
65
+	}
66
+	else
67
+	{
68
+		kdDebug() << "New Document is done..." << endl;
69
+		m_Doc = new Document(doc);
70
+		m_list.clear();
71
+		Article::List list = doc.articles();
72
+		for(Article::List::ConstIterator it = list.begin(); it != list.end(); ++it)
73
+		{
74
+			int state = m_state[(*it).title()];
75
+			if( state == 0 ) m_state[(*it).title()] = 1; // new
76
+			else if( state == 1 ) m_state[(*it).title()] = 2; // old message now
77
+			m_list.append( new RSSArticle( new Article(*it)));
78
+		}
79
+		Image *img = m_Doc->image();
80
+		if ( img )
81
+		{
82
+			connect(img, SIGNAL(gotPixmap(const QPixmap &)),
83
+				SLOT(pixmapLoaded(const QPixmap &)));
84
+			img->getPixmap();
85
+			pixmapUpdating(DCOPRef(this));
86
+		}
87
+		m_isLoading = false;
88
+		documentUpdated(DCOPRef(this));
89
+
90
+		kdDebug() << "Old Mod time " << m_Timeout.toString() << endl;
91
+		m_Timeout = m_Timeout.addSecs(m_maxAge * 60 );
92
+		kdDebug() << "New Mod time " << m_Timeout.toString() << endl;
93
+
94
+	}
95
+}
96
+
97
+void RSSDocument::pixmapLoaded(const QPixmap &pix )
98
+{
99
+	m_pix = pix;
100
+	pixmapUpdated(DCOPRef(this));
101
+}
102
+
103
+QString RSSDocument::webMaster()
104
+{
105
+	if( m_Doc != 0L)
106
+		return m_Doc->webMaster();
107
+	else
108
+		return "";
109
+}
110
+
111
+QString RSSDocument::managingEditor()
112
+{
113
+	if( m_Doc != 0L)
114
+			return m_Doc->managingEditor();
115
+	else
116
+		return "";
117
+}
118
+
119
+QString RSSDocument::rating()
120
+{
121
+	if( m_Doc != 0L)
122
+		return m_Doc->rating();
123
+	else
124
+		return "";
125
+}
126
+
127
+QDateTime RSSDocument::lastBuildDate()
128
+{
129
+	if( m_Doc != 0L)
130
+		return m_Doc->lastBuildDate();
131
+	else
132
+		return QDateTime::currentDateTime();
133
+}
134
+
135
+QDateTime RSSDocument::pubDate()
136
+{
137
+	if( m_Doc != 0L)
138
+		return m_Doc->pubDate();
139
+	else
140
+		return QDateTime::currentDateTime();
141
+}
142
+
143
+QString RSSDocument::copyright()
144
+{
145
+	if( m_Doc != 0L)
146
+		return m_Doc->copyright();
147
+	else
148
+		return "";
149
+}
150
+
151
+QStringList RSSDocument::articles()
152
+{
153
+	if( m_Doc != 0L)
154
+	{
155
+		kdDebug() << "Document giving articles..." << endl;
156
+		Article::List list = m_Doc->articles();
157
+		QStringList stringList;
158
+
159
+		for(Article::List::ConstIterator it = list.begin(); it != list.end(); ++it)
160
+				stringList.append((*it).title());
161
+		return stringList;
162
+	}
163
+	else
164
+		return QStringList();
165
+}
166
+
167
+DCOPRef RSSDocument::article(int idx)
168
+{
169
+	if(m_list.at(idx))
170
+		return DCOPRef(m_list.at(idx));
171
+	else
172
+		return DCOPRef();
173
+}
174
+
175
+int RSSDocument::count()
176
+{
177
+	if( m_Doc != 0L)
178
+		return m_Doc->articles().count();
179
+	return 0;
180
+}
181
+
182
+QString RSSDocument::link()
183
+{
184
+	if( m_Doc != 0L)
185
+		return m_Doc->link().prettyURL();
186
+	else
187
+		return "";
188
+}
189
+
190
+QString RSSDocument::description()
191
+{
192
+	if( m_Doc != 0L)
193
+		return m_Doc->description();
194
+	else
195
+		return "";
196
+}
197
+
198
+QString RSSDocument::title()
199
+{
200
+	if( m_Doc != 0L)
201
+		return m_Doc->title();
202
+	else
203
+		return "";
204
+}
205
+
206
+QString RSSDocument::verbVersion()
207
+{
208
+	if( m_Doc != 0L)
209
+		return m_Doc->verbVersion();
210
+	else
211
+		return "";
212
+}
213
+
214
+QString RSSDocument::pixmapURL()
215
+{
216
+	if( m_Doc != 0L)
217
+		if( m_Doc->image() )
218
+			return m_Doc->image()->url().prettyURL();
219
+		else
220
+			return "";
221
+	else
222
+		return "";
223
+}
224
+
225
+QPixmap RSSDocument::pixmap()
226
+{
227
+	return m_pix;
228
+}
229
+
230
+bool RSSDocument::documentValid()
231
+{
232
+	if (m_Doc != 0L)
233
+		return true;
234
+	else
235
+		return false;
236
+}
237
+
238
+bool RSSDocument::pixmapValid()
239
+{
240
+	return !m_pix.isNull();
241
+}
242
+
243
+void RSSDocument::refresh()
244
+{
245
+	kdDebug() << "Mod time " << m_Timeout.toString() << endl;
246
+	kdDebug() << "Current time " << QDateTime::currentDateTime().toString() << endl;
247
+
248
+	if(!m_isLoading  && (QDateTime::currentDateTime() >= m_Timeout))
249
+	{
250
+		kdDebug() << "Document going to refresh" << endl;
251
+		m_isLoading = true;
252
+		Loader *loader = Loader::create(this,
253
+			SLOT(loadingComplete(Loader *, Document, Status)));
254
+		loader->loadFrom(KURL( m_Url ),  new FileRetriever());
255
+		documentUpdating(DCOPRef(this));
256
+	}
257
+	else
258
+	{
259
+		documentUpdated(DCOPRef(this));
260
+		if(pixmapValid())
261
+			pixmapUpdated(DCOPRef(this));
262
+		/*
263
+		else
264
+		{
265
+			// Refactor this!
266
+			Image *img = m_Doc->image();
267
+			if ( img )
268
+			{
269
+				connect(img, SIGNAL(gotPixmap(const QPixmap &)),
270
+					SLOT(pixmapLoaded(const QPixmap &)));
271
+				img->getPixmap();
272
+				pixmapUpdating(DCOPRef(this));
273
+			}
274
+		}
275
+		*/
276
+	}
277
+
278
+}
279
+
280
+int RSSDocument::maxAge()
281
+{
282
+	return m_maxAge;
283
+}
284
+
285
+void RSSDocument::setMaxAge(int _min)
286
+{
287
+	m_Timeout.addSecs(-m_maxAge);
288
+	m_maxAge = _min;
289
+	m_Timeout.addSecs(m_maxAge);
290
+}
291
+
292
+int RSSDocument::state( const QString &title) const
293
+{
294
+	return m_state[title];
295
+}
296
+
297
+void RSSDocument::setState( const QString &title, int s )
298
+{
299
+	m_state[title] = s;
300
+}
301
+
302
+void RSSDocument::read( const QString &title)
303
+{
304
+	m_state[title] = 3;
305
+}
306
+
307
+#include "service.moc"

+ 144
- 0
dcoprss/feedbrowser.cpp View File

@@ -0,0 +1,144 @@
1
+#include "feedbrowser.h"
2
+
3
+#include <kaboutdata.h>
4
+#include <kapplication.h>
5
+#include <kcmdlineargs.h>
6
+#include <kdebug.h>
7
+#include <kdialogbase.h>
8
+#include <klistview.h>
9
+#include <klocale.h>
10
+#include <dcopclient.h>
11
+
12
+#include <qcstring.h>
13
+#include <qdatastream.h>
14
+#include <qvbox.h>
15
+
16
+CategoryItem::CategoryItem( KListView *parent, const QString &category )
17
+	: KListViewItem( parent ),
18
+	m_category( category )
19
+{
20
+	init();
21
+}
22
+
23
+CategoryItem::CategoryItem( KListViewItem *parent, const QString &category )
24
+	: KListViewItem( parent ),
25
+	m_category( category )
26
+{
27
+	init();
28
+}
29
+
30
+void CategoryItem::init()
31
+{
32
+	m_populated = false;
33
+	m_dcopIface = 0;
34
+
35
+	setText( 0, m_category.mid( m_category.findRev( '/' ) + 1 ).replace( '_', ' ' ) );
36
+}
37
+
38
+void CategoryItem::setOpen( bool open )
39
+{
40
+	if ( open && !m_populated ) {
41
+		populate();
42
+		m_populated = true;
43
+	}
44
+	KListViewItem::setOpen( open );
45
+}
46
+
47
+void CategoryItem::populate()
48
+{
49
+	m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" );
50
+	connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ),
51
+	         this, SLOT( gotCategories( const QStringList & ) ) );
52
+	m_dcopIface->getCategories( m_category );
53
+}
54
+
55
+void CategoryItem::gotCategories( const QStringList &categories )
56
+{
57
+	delete m_dcopIface;
58
+	m_dcopIface = 0;
59
+
60
+	QStringList::ConstIterator it = categories.begin();
61
+	QStringList::ConstIterator end = categories.end();
62
+	for ( ; it != end; ++it )
63
+		new CategoryItem( this, *it );
64
+
65
+	if ( !categories.isEmpty() )
66
+		KListViewItem::setOpen( true );
67
+}
68
+
69
+DCOPRSSIface::DCOPRSSIface( QObject *parent, const char *name ) :
70
+	QObject( parent, name ), DCOPObject( "FeedBrowser" )
71
+{
72
+	connectDCOPSignal( "rssservice", "RSSQuery", "gotCategories(QStringList)",
73
+	                   "slotGotCategories(QStringList)", false );
74
+}
75
+
76
+void DCOPRSSIface::getCategories( const QString &cat )
77
+{
78
+	QByteArray data;
79
+	QDataStream stream( data, IO_WriteOnly );
80
+	stream << cat;
81
+	kapp->dcopClient()->send( "rssservice", "RSSQuery",
82
+	                          "getCategories(QString)", data );
83
+}
84
+
85
+void DCOPRSSIface::slotGotCategories( const QStringList &categories )
86
+{
87
+	emit gotCategories( categories );
88
+}
89
+
90
+FeedBrowserDlg::FeedBrowserDlg( QWidget *parent, const char *name )
91
+	: KDialogBase( parent, name, true, i18n( "DCOPRSS Feed Browser" ),
92
+	               Close, Close, true )
93
+{
94
+	m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" );
95
+	connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ),
96
+	         this, SLOT( gotTopCategories( const QStringList & ) ) );
97
+
98
+	QVBox *mainWidget = makeVBoxMainWidget();
99
+
100
+	m_feedList = new KListView( mainWidget, "m_feedList" );
101
+	m_feedList->setAllColumnsShowFocus( true );
102
+	m_feedList->setRootIsDecorated( true );
103
+	m_feedList->addColumn( i18n( "Name" ) );
104
+	connect( m_feedList, SIGNAL( executed( QListViewItem * ) ),
105
+	         this, SLOT( itemSelected( QListViewItem * ) ) );
106
+	connect( m_feedList, SIGNAL( returnPressed( QListViewItem * ) ),
107
+	         this, SLOT( itemSelected( QListViewItem * ) ) );
108
+
109
+	resize( 500, 400 );
110
+
111
+	getTopCategories();
112
+}
113
+
114
+void FeedBrowserDlg::getTopCategories()
115
+{
116
+	m_dcopIface->getCategories( "Top" );
117
+}
118
+
119
+void FeedBrowserDlg::gotTopCategories( const QStringList &categories )
120
+{
121
+	QStringList::ConstIterator it = categories.begin();
122
+	QStringList::ConstIterator end = categories.end();
123
+	for ( ; it != end; ++it )
124
+		new CategoryItem( m_feedList, *it );
125
+}
126
+
127
+void FeedBrowserDlg::itemSelected( QListViewItem *item )
128
+{
129
+	item->setOpen( !item->isOpen() );
130
+}
131
+
132
+int main( int argc, char **argv )
133
+{
134
+	KGlobal::locale()->setMainCatalogue( "dcoprss" );
135
+	KAboutData aboutData( "feedbrowser", I18N_NOOP( "Feed Browser" ), "0.1" );
136
+	KCmdLineArgs::init( argc, argv, &aboutData );
137
+	KApplication app;
138
+	FeedBrowserDlg *dlg = new FeedBrowserDlg( 0 );
139
+	app.setMainWidget( dlg );
140
+	dlg->show();
141
+	return app.exec();
142
+}
143
+
144
+#include "feedbrowser.moc"

+ 66
- 0
dcoprss/feedbrowser.h View File

@@ -0,0 +1,66 @@
1
+#ifndef FEEDBROWSER_H
2
+#define FEEDBROWSER_H
3
+
4
+#include <qobject.h>
5
+#include <dcopobject.h>
6
+#include <kdialogbase.h>
7
+#include <klistview.h>
8
+
9
+class DCOPRSSIface : public QObject, public DCOPObject
10
+{
11
+	K_DCOP
12
+	Q_OBJECT
13
+	public:
14
+		DCOPRSSIface( QObject *parent, const char *name = 0 );
15
+
16
+	k_dcop:
17
+		void slotGotCategories( const QStringList &categories );
18
+
19
+	public slots:
20
+		void getCategories( const QString &cat = "Top" );
21
+
22
+	signals:
23
+		void gotCategories( const QStringList &categories );
24
+};
25
+
26
+class CategoryItem : public QObject, public KListViewItem
27
+{
28
+	Q_OBJECT
29
+	public:
30
+		CategoryItem( KListView *parent, const QString &category );
31
+		CategoryItem( KListViewItem *parent, const QString &category );
32
+
33
+		virtual void setOpen( bool open );
34
+
35
+	private slots:
36
+		void gotCategories( const QStringList &categories );
37
+
38
+	private:
39
+		void populate();
40
+		void init();
41
+
42
+		QString m_category;
43
+		bool m_populated;
44
+		DCOPRSSIface *m_dcopIface;
45
+};
46
+
47
+class FeedBrowserDlg : public KDialogBase
48
+{
49
+	Q_OBJECT
50
+	friend class CategoryItem;
51
+	public:
52
+		FeedBrowserDlg( QWidget *parent, const char *name = 0 );
53
+
54
+	private slots:
55
+		void itemSelected( QListViewItem *item );
56
+		void gotTopCategories( const QStringList &categories );
57
+
58
+	private:
59
+		void getTopCategories();
60
+
61
+		DCOPRSSIface *m_dcopIface;
62
+		KListView *m_feedList;
63
+};
64
+
65
+#endif // FEEDBROWSER_H
66
+// vim:ts=4:sw=4:noet

+ 39
- 0
dcoprss/main.cpp View File

@@ -0,0 +1,39 @@
1
+/* $Id$ */
2
+
3
+#include <kuniqueapplication.h>
4
+#include <kaboutdata.h>
5
+#include <kcmdlineargs.h>
6
+#include <kdebug.h>
7
+#include <kaboutdata.h>
8
+#include <klocale.h>
9
+#include <dcopclient.h>
10
+#include "service.h"
11
+#include "query.h"
12
+
13
+int main (int argc, char *argv[])
14
+{
15
+	KLocale::setMainCatalogue("dcoprss");
16
+	KAboutData aboutdata("rssservice", I18N_NOOP("KDE RSS Service"),
17
+				"0.8", I18N_NOOP("A RSS data service."),
18
+				KAboutData::License_GPL, "(C) 2003, Ian Reinhart Geiser");
19
+	aboutdata.addAuthor("Ian Reinhart Geiser",I18N_NOOP("Developer"),"geiseri@kde.org");
20
+
21
+	KCmdLineArgs::init( argc, argv, &aboutdata );
22
+	// KCmdLineArgs::addCmdLineOptions( options );
23
+	KUniqueApplication::addCmdLineOptions();
24
+
25
+	if (!KUniqueApplication::start())
26
+	{
27
+		kdDebug() << "rssservice is already running!" << endl;
28
+		return (0);
29
+	}
30
+
31
+	KUniqueApplication app;
32
+	kdDebug() << "starting rssservice " << endl;
33
+	// This app is started automatically, no need for session management
34
+	app.disableSessionManagement();
35
+	RSSService *service = new RSSService;
36
+	QueryService *query = new QueryService(service);
37
+
38
+	return app.exec();
39
+}

+ 271
- 0
dcoprss/query.cpp View File

@@ -0,0 +1,271 @@
1
+/* $Id$ */
2
+
3
+/***************************************************************************
4
+                          query.cpp  -  A query interface to select RSS feeds.
5
+                             -------------------
6
+    begin                : Saturday 15 February 2003
7
+    copyright            : (C) 2003 by Ian Reinhart Geiser
8
+    email                : geiseri@kde.org
9
+ ***************************************************************************/
10
+
11
+/***************************************************************************
12
+ *                                                                         *
13
+ *   This program is free software; you can redistribute it and/or modify  *
14
+ *   it under the terms of the GNU General Public License as published by  *
15
+ *   the Free Software Foundation; either version 2 of the License, or     *
16
+ *   (at your option) any later version.                                   *
17
+ *                                                                         *
18
+ ***************************************************************************/
19
+#include "cache.h"
20
+#include "query.h"
21
+
22
+#include <kdebug.h>
23
+#include <krfcdate.h>
24
+
25
+#include "service.h"
26
+#include "xmlrpciface.h"
27
+
28
+using KXMLRPC::Server;
29
+
30
+void SlotCaller::call( QObject *object, const char *slot,
31
+                       const KXMLRPC::Query::Result &result )
32
+{
33
+	SlotCaller caller;
34
+	connect( &caller, SIGNAL( signal( const KXMLRPC::Query::Result &) ),
35
+	         object, slot );
36
+	emit caller.signal( result );
37
+}
38
+
39
+QueryService::QueryService( RSSService *service ) : QObject(), DCOPObject( "RSSQuery" ),
40
+	m_service( service )
41
+{
42
+	m_xmlrpcServer = new KXMLRPC::Server( KURL( "http://www.syndic8.com/xmlrpc.php"), this );
43
+}
44
+
45
+QStringList QueryService::listActive()
46
+{
47
+	if ( !m_service )
48
+		return QStringList();
49
+	return m_service->list();
50
+}
51
+
52
+void QueryService::cachedCall( const QString &method,
53
+                               const QValueList<QVariant> &args,
54
+                               const char *slot )
55
+{
56
+	kdDebug() << "Calling " << method << endl;
57
+
58
+	const QString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(),
59
+	                                             method, args );
60
+
61
+	CacheEntry *cacheEntry = Cache::self().find( cacheKey );
62
+	if ( cacheEntry != 0 && cacheEntry->isValid() ) {
63
+		kdDebug() << "Using cached result." << endl;
64
+		SlotCaller::call( this, slot, cacheEntry->result() );
65
+	} else {
66
+		kdDebug() << "No cached result found, querying server." << endl;
67
+		m_xmlrpcServer->call( method, args, this, slot );
68
+	}
69
+}
70
+
71
+void QueryService::updateCache( const KXMLRPC::Query::Result &result )
72
+{
73
+	const QString cacheKey = Cache::getCacheKey( result.server(),
74
+	                                             result.method(),
75
+	                                             result.args() );
76
+
77
+	CacheEntry *cacheEntry = Cache::self().find( cacheKey );
78
+	if ( cacheEntry == 0 ) {
79
+		kdDebug() << "Inserting returned result into cache." << endl;
80
+		Cache::self().insert( cacheKey, result );
81
+	}
82
+}
83
+
84
+void QueryService::findFeeds( const QString &query )
85
+{
86
+	kdDebug() << "QueryService::findFeeds()" << endl;
87
+
88
+	QStringList args;
89
+	args << query << "headlines_rank";
90
+
91
+	cachedCall( "syndic8.FindFeeds", Server::toVariantList( args ),
92
+	            SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
93
+}
94
+
95
+void QueryService::findSites( const QString& query )
96
+{
97
+	kdDebug() << "QueryService::findSites()" << endl;
98
+
99
+	cachedCall( "syndic8.FindSites", Server::toVariantList( query ),
100
+	            SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) );
101
+}
102
+
103
+void QueryService::getFeedInfo( const QVariant& ids )
104
+{
105
+	kdDebug() << "QueryService::getFeedInfo()" << endl;
106
+
107
+	cachedCall( "syndic8.GetFeedInfo", Server::toVariantList( ids ),
108
+	            SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) );
109
+}
110
+
111
+void QueryService::getCategories( const QString &category )
112
+{
113
+	kdDebug() << "QueryService::getCategories()" << endl;
114
+
115
+	if ( category == "Top" ) {
116
+		cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( QString::fromLatin1( "DMOZ" ) ),
117
+		            SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
118
+	} else {
119
+		QStringList args;
120
+		args << "DMOZ" << category;
121
+		cachedCall( "syndic8.GetCategoryChildren", Server::toVariantList( args ),
122
+		            SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) );
123
+	}
124
+}
125
+
126
+void QueryService::getFeedsInCategory( const QString &category )
127
+{
128
+	kdDebug() << "QueryService::getFeedsInCategory()" << endl;
129
+
130
+	QStringList args;
131
+	args << "DMOZ" << category;
132
+
133
+	cachedCall( "syndic8.GetFeedsInCategory", Server::toVariantList( args ),
134
+	            SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) );
135
+}
136
+
137
+void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result )
138
+{
139
+	kdDebug() << "QueryService::slotFoundFeeds()" << endl;
140
+	if ( !result.success() ) {
141
+		kdWarning() << "Failed to query for feeds: " << result.errorString() << endl;
142
+		return;
143
+	}
144
+
145
+	updateCache( result );
146
+
147
+	QValueList<int> ids;
148
+
149
+	const QValueList<QVariant> values = result.data()[ 0 ].toList();
150
+	QValueList<QVariant>::ConstIterator it = values.begin();
151
+	QValueList<QVariant>::ConstIterator end = values.end();
152
+	for ( ; it != end; ++it ) {
153
+		ids << ( *it ).toInt();
154
+		kdDebug() << "Found feed #" << ( *it ).toInt() << endl;
155
+	}
156
+	feedIds( ids );
157
+}
158
+
159
+void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result )
160
+{
161
+	kdDebug() << "QueryService::slotGotFeedInfo()" << endl;
162
+	if ( !result.success() ) {
163
+		kdWarning() << "Failed to get feed info: " << result.errorString() << endl;
164
+		return;
165
+	}
166
+
167
+	updateCache( result );
168
+
169
+	QMap<QString, QString> links;
170
+	QValueList<RSSNewsFeed> feeds;
171
+
172
+	const QValueList<QVariant> feedInfos = result.data();
173
+	QValueList<QVariant>::ConstIterator it = feedInfos.begin();
174
+	QValueList<QVariant>::ConstIterator end = feedInfos.end();
175
+	for ( ; it != end; ++it ) {
176
+		const QMap<QString, QVariant> feedInfo = ( *it ).toMap();
177
+
178
+		const QString name = feedInfo[ "sitename" ].toString();
179
+		const QString link = feedInfo[ "dataurl" ].toString();
180
+		links[ name ] = link;
181
+
182
+		RSSNewsFeed feed;
183
+		feed.m_id = feedInfo[ "feedid" ].toUInt();
184
+		feed.m_name = feedInfo[ "sitename" ].toString();
185
+		feed.m_homePage = feedInfo[ "siteurl" ].toString();
186
+		feed.m_sourceFile = feedInfo[ "dataurl" ].toString();
187
+		feed.m_imageUrl = feedInfo[ "imageurl" ].toString();
188
+		feed.m_webmaster = feedInfo[ "webmaster" ].toString();
189
+		feed.m_editor = feedInfo[ "editor" ].toString();
190
+		feed.m_publisher = feedInfo[ "publisher" ].toString();
191
+		feed.m_creator = feedInfo[ "creator" ].toString();
192
+		QDateTime dateTime;
193
+		dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_created" ].toString() ) );
194
+		feed.m_dateCreated = dateTime;
195
+		dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_approved" ].toString() ) );
196
+		feed.m_dateApproved = dateTime;
197
+		dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_xml_changed" ].toString() ) );
198
+		feed.m_dateXmlChanged = dateTime;
199
+		feed.m_fetchable = feedInfo[ "fetchable" ].toBool();
200
+		feed.m_description = feedInfo[ "description" ].toString();
201
+		feed.m_origin = feedInfo[ "origin" ].toString();
202
+		feed.m_languageCode = feedInfo[ "lang_code" ].toString();
203
+		feed.m_status = feedInfo[ "status" ].toString();
204
+		feed.m_version = feedInfo[ "rss_version" ].toString();
205
+		feed.m_views = feedInfo[ "views" ].toUInt();
206
+		feed.m_headlinesPerDay = feedInfo[ "headlines_per_day" ].toUInt();
207
+		feed.m_headlinesRank = feedInfo[ "headlines_rank" ].toUInt();
208
+		feed.m_toolkit = feedInfo[ "toolkit" ].toString();
209
+		feed.m_toolkitVersion = feedInfo[ "toolkit_version" ].toString();
210
+		feed.m_pollingInterval = feedInfo[ "cur_polling_interval" ].toUInt();
211
+		dateTime.setTime_t( feedInfo[ "last_poll_time" ].toUInt() );
212
+		feed.m_lastPoll = dateTime;
213
+		// ### feed.m_categories missing here!
214
+
215
+		feeds << feed;
216
+
217
+		kdDebug() << "Retrieved data for newsfeed '" << name << "' <" << link << ">" << endl;
218
+	}
219
+
220
+	feedInfo( links );
221
+	feedInfo( feeds );
222
+}
223
+
224
+void QueryService::slotGotCategories( const KXMLRPC::Query::Result &result )
225
+{
226
+	kdDebug() << "QueryService::slotGotCategories()" << endl;
227
+	if ( !result.success() ) {
228
+		kdWarning() << "Failed to get the list of categories: " << result.errorString() << endl;
229
+		return;
230
+	}
231
+
232
+	updateCache( result );
233
+
234
+	QStringList categories;
235
+
236
+	const QValueList<QVariant> cats = result.data()[ 0 ].toList();
237
+	QValueList<QVariant>::ConstIterator it = cats.begin();
238
+	QValueList<QVariant>::ConstIterator end = cats.end();
239
+	for (  ; it != end; ++it )
240
+		categories << (  *it ).toString();
241
+
242
+	kdDebug() << "Got categories: " << categories.join(  ", " ) << endl;
243
+	gotCategories(  categories );
244
+
245
+}
246
+
247
+void QueryService::slotGotFeedsInCategory( const KXMLRPC::Query::Result &result )
248
+{
249
+	kdDebug() << "QueryService::slotGotFeedsInCategory()" << endl;
250
+	if ( !result.success() ) {
251
+		kdWarning() << "Failed to get the feeds in the given category: " << result.errorString() << endl;
252
+		return;
253
+	}
254
+
255
+	updateCache( result );
256
+
257
+	QValueList<int> ids;
258
+
259
+	const QValueList<QVariant> values = result.data()[ 0 ].toList();
260
+	QValueList<QVariant>::ConstIterator it = values.begin();
261
+	QValueList<QVariant>::ConstIterator end = values.end();
262
+	for (  ; it != end; ++it ) {
263
+		ids << (  *it ).toInt();
264
+		kdDebug() << "Got feed in category: #" << ( *it ).toInt() << endl;
265
+	}
266
+
267
+	gotFeedsInCategory(  ids );
268
+}
269
+
270
+#include "query.moc"
271
+// vim:ts=4:sw=4:noet

+ 120
- 0
dcoprss/query.h View File

@@ -0,0 +1,120 @@
1
+/* $Id$ */
2
+#ifndef _QUERY_SERVICE
3
+#define _QUERY_SERVICE
4
+
5
+/***************************************************************************
6
+                          query.h  -  A query interface to select RSS feeds.
7
+                             -------------------
8
+    begin                : Saturday 15 February 2003
9
+    copyright            : (C) 2003 by Ian Reinhart Geiser
10
+    email                : geiseri@kde.org
11
+ ***************************************************************************/
12
+
13
+/***************************************************************************
14
+ *                                                                         *
15
+ *   This program is free software; you can redistribute it and/or modify  *
16
+ *   it under the terms of the GNU General Public License as published by  *
17
+ *   the Free Software Foundation; either version 2 of the License, or     *
18
+ *   (at your option) any later version.                                   *
19
+ *                                                                         *
20
+ ***************************************************************************/
21
+
22
+#include "rssnewsfeed.h"
23
+#include "xmlrpciface.h"
24
+
25
+#include <dcopobject.h>
26
+
27
+#include <qmap.h>
28
+#include <qobject.h>
29
+#include <qvaluelist.h>
30
+#include <qvariant.h>
31
+
32
+class RSSService;
33
+
34
+/**
35
+ * Helper class which just calls the slot given it's QObject/const char*
36
+ * representation.
37
+ */
38
+class SlotCaller : public QObject
39
+{
40
+	Q_OBJECT
41
+	public:
42
+		static void call( QObject *object, const char *slot,
43
+		                  const KXMLRPC::Query::Result &value );
44
+
45
+	signals:
46
+		void signal( const KXMLRPC::Query::Result &value );
47
+
48
+	private:
49
+		SlotCaller() { }
50
+};
51
+
52
+class QueryService : public QObject, public DCOPObject
53
+{
54
+	K_DCOP
55
+	Q_OBJECT
56
+	public:
57
+		QueryService( RSSService *service );
58
+
59
+	k_dcop_signals:
60
+		void feedIds( QValueList<int> ids );
61
+		void feedInfo(QMap<QString, QString> links);
62
+		void feedInfo(QValueList<RSSNewsFeed> feeds);
63
+		void gotCategories( const QStringList &categories );
64
+		void gotFeedsInCategory( const QValueList<int> &ids );
65
+
66
+	k_dcop:
67
+		/**
68
+		 * Lists the active feeds in use...
69
+		 **/
70
+		QStringList listActive(); // just for testing...