• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
ksocks.cpp
1/* This file is part of the KDE libraries
2 Copyright (C) 2001-2003 George Staikos <staikos@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#include <config.h>
20
21#ifdef HAVE_SYS_TIME_H
22#include <sys/time.h>
23#endif
24
25#include <tqfile.h>
26#include <tqstring.h>
27#include <tqmap.h>
28
29#include <tdelocale.h>
30#include <kdebug.h>
31#include "klibloader.h"
32#include <tdeconfig.h>
33#include <tdeapplication.h>
34
35#include <sys/types.h>
36#include <sys/socket.h>
37
38#include <unistd.h>
39
40#include "ksocks.h"
41
42// DO NOT RE-ORDER THESE.
43enum SymbolKeys {
44 S_SOCKSinit = 0,
45 S_connect = 1,
46 S_read = 2,
47 S_write = 3,
48 S_recvfrom = 4,
49 S_sendto = 5,
50 S_recv = 6,
51 S_send = 7,
52 S_getsockname = 8,
53 S_getpeername = 9,
54 S_accept = 10,
55 S_select = 11,
56 S_listen = 12,
57 S_bind = 13
58 };
59
60
61extern "C" {
62// Function pointer table
63static int (*F_SOCKSinit) (char *) = 0L;
64static int (*F_connect) (int, const struct sockaddr *, ksocklen_t) = 0L;
65static signed long int (*F_read) (int, void *, unsigned long int) = 0L;
66static signed long int (*F_write) (int, const void *, unsigned long int) = 0L;
67static int (*F_recvfrom) (int, void *, unsigned long int, int, struct sockaddr *,
68 ksocklen_t *) = 0L;
69static int (*F_sendto) (int, const void *, unsigned long int, int,
70 const struct sockaddr *, ksocklen_t) = 0L;
71static int (*F_recv) (int, void *, unsigned long int, int) = 0L;
72static int (*F_send) (int, const void *, unsigned long int, int) = 0L;
73static int (*F_getsockname) (int, struct sockaddr *, ksocklen_t *) = 0L;
74static int (*F_getpeername) (int, struct sockaddr *, ksocklen_t *) = 0L;
75static int (*F_accept) (int, struct sockaddr *, ksocklen_t *) = 0L;
76static int (*F_select) (int, fd_set *, fd_set *, fd_set *,
77 struct timeval *) = 0L;
78static int (*F_listen) (int, int) = 0L;
79static int (*F_bind) (int, const struct sockaddr *, ksocklen_t) = 0L;
80}
81
82
83class KSocksTable {
84 public:
85 KSocksTable();
86 virtual ~KSocksTable();
87
88 // The name of each symbol and it's SOCKS replacement
89 TQMap<SymbolKeys,TQString> symbols;
90 // The name of this library
91 TQString myname;
92 bool hasWorkingAsyncConnect;
93};
94
95
96KSocksTable::KSocksTable() : myname("Unknown"), hasWorkingAsyncConnect(true) {
97}
98
99KSocksTable::~KSocksTable() {
100}
101
102
103/*
104 * How to add support for a new SOCKS package.
105 *
106 * 1) Subclass KSocksTable as is done below and write out all the symbols
107 * 1.b) Give the class a "myname"
108 * 2) Make sure that all possible library names are written into the
109 * _libNames string list. Don't forget that different OSes name shared
110 * libraries differently. Expect .so, .sl, .a (!) (AIX does this).
111 * 3) Find a unique symbol in the library that we can use to identify that
112 * library and write out the test case in the constructor
113 * 4) Make necessary changes to the KControl module in tdebase/kcontrol/....
114 * 5) TEST!
115 *
116 */
117
121
122
123//
124// Support for NEC SOCKS client
125//
126
127class KNECSocksTable : public KSocksTable {
128 public:
129 KNECSocksTable();
130 virtual ~KNECSocksTable();
131};
132
133
134KNECSocksTable::KNECSocksTable() : KSocksTable() {
135 myname = i18n("NEC SOCKS client");
136 symbols.insert(S_SOCKSinit, "SOCKSinit");
137 symbols.insert(S_connect, "connect");
138 symbols.insert(S_read, "read");
139 symbols.insert(S_write, "write");
140 symbols.insert(S_recvfrom, "recvfrom");
141 symbols.insert(S_sendto, "sendto");
142 symbols.insert(S_recv, "recv");
143 symbols.insert(S_send, "send");
144 symbols.insert(S_getsockname, "getsockname");
145 symbols.insert(S_getpeername, "getpeername");
146 symbols.insert(S_accept, "accept");
147 symbols.insert(S_select, "select");
148 symbols.insert(S_listen, "listen");
149 symbols.insert(S_bind, "bind");
150}
151
152KNECSocksTable::~KNECSocksTable() {
153}
154
155
156
157
158//
159// Support for Dante SOCKS client
160//
161
162class KDanteSocksTable : public KSocksTable {
163 public:
164 KDanteSocksTable();
165 virtual ~KDanteSocksTable();
166};
167
168KDanteSocksTable::KDanteSocksTable() : KSocksTable() {
169 hasWorkingAsyncConnect = false;
170 myname = i18n("Dante SOCKS client");
171 symbols.insert(S_SOCKSinit, "SOCKSinit");
172 symbols.insert(S_connect, "Rconnect");
173 symbols.insert(S_read, "Rread");
174 symbols.insert(S_write, "Rwrite");
175 symbols.insert(S_recvfrom, "Rrecvfrom");
176 symbols.insert(S_sendto, "Rsendto");
177 symbols.insert(S_recv, "Rrecv");
178 symbols.insert(S_send, "Rsend");
179 symbols.insert(S_getsockname, "Rgetsockname");
180 symbols.insert(S_getpeername, "Rgetpeername");
181 symbols.insert(S_accept, "Raccept");
182 symbols.insert(S_select, "Rselect");
183 symbols.insert(S_listen, "Rlisten");
184 symbols.insert(S_bind, "Rbind");
185}
186
187
188KDanteSocksTable::~KDanteSocksTable() {
189}
190
191
192
196
197
198KSocks *KSocks::_me = 0;
199#ifdef __CYGWIN__
200bool KSocks::_disabled = true;
201#else
202bool KSocks::_disabled = false;
203#endif
204static KStaticDeleter<KSocks> med;
205
206void KSocks::disable()
207{
208 if (!_me)
209 _disabled = true;
210}
211
212KSocks *KSocks::self() {
213 // Note that we don't use a static deleter here. It makes no sense and tends to cause crashes.
214 if (!_me) {
215 if (tdeApp) {
216 TDEConfigGroup cfg(tdeApp->config(), "Socks");
217 _me = new KSocks(&cfg);
218 } else {
219 _disabled = true;
220 _me = new KSocks(0);
221 }
222 }
223 return _me;
224}
225
226void KSocks::setConfig(TDEConfigBase *config)
227{
228 // We can change the config from disabled to enabled
229 // but not the other way around.
230 if (_me && _disabled) {
231 delete _me;
232 _me = 0;
233 _disabled = false;
234 }
235 if (!_me)
236 _me = new KSocks(config);
237}
238
239bool KSocks::activated() { return (_me != 0L); }
240
241
242KSocks::KSocks(TDEConfigBase *config) : _socksLib(0L), _st(0L) {
243 _hasSocks = false;
244 _useSocks = false;
245
246 if (!config)
247 return;
248
249 if (!(config->readBoolEntry("SOCKS_enable", false))) {
250 _disabled = true;
251 }
252
253 if (_disabled)
254 return;
255
256 _libPaths << ""
257 << "/usr/" SYSTEM_LIBDIR "/"
258 << "/usr/lib/"
259 << "/usr/local/" SYSTEM_LIBDIR "/"
260 << "/usr/local/lib/"
261 << "/usr/local/socks5/" SYSTEM_LIBDIR "/"
262 << "/usr/local/socks5/lib/"
263 << "/opt/socks5/" SYSTEM_LIBDIR "/"
264 << "/opt/socks5/lib/";
265 _libNames << "libsocks.so" // Dante
266 << "libdsocksd.so.0" // Dante 1.1.14-2 on
267 // Debian unstable 17-12-2003
268 << "libsocks5.so" // ?
269 << "libsocks5_sh.so"; // NEC
270
271 // Add the custom library paths here
272 TQStringList newlibs = config->readListEntry("SOCKS_lib_path");
273
274 for (TQStringList::Iterator it = newlibs.begin();
275 it != newlibs.end();
276 ++it) {
277 TQString thisone = *it;
278 if (thisone[thisone.length()-1] != '/') thisone += "/";
279 _libPaths << thisone;
280 kdDebug(171) << "KSocks added a new library path: " << thisone << endl;
281 }
282
283 // Load the proper libsocks and KSocksTable
284 KLibLoader *ll = KLibLoader::self();
285
286
287 int _meth = config->readNumEntry("SOCKS_method", 1);
288 /**** Current methods
289 * 1) Autodetect (read: any) 2) NEC
290 * 3) Dante 4) Custom
291 */
292
293 if (_meth == 4) { // try to load^H^H^H^Hguess at a custom library
294 _socksLib = ll->library(config->readPathEntry("SOCKS_lib").latin1());
295 if (_socksLib && _socksLib->symbol("Rconnect")) { // Dante compatible?
296 _st = new KDanteSocksTable;
297 _useSocks = true;
298 _hasSocks = true;
299 } else if (_socksLib && _socksLib->symbol("connect")) { // NEC compatible?
300 _st = new KNECSocksTable;
301 _useSocks = true;
302 _hasSocks = true;
303 } else if (_socksLib) {
304 _socksLib->unload();
305 _socksLib = 0L;
306 }
307 } else // leave this here "else for {}"
308 for (TQStringList::Iterator pit = _libPaths.begin();
309 !_hasSocks && pit != _libPaths.end();
310 ++pit)
311 for (TQStringList::Iterator it = _libNames.begin();
312 it != _libNames.end();
313 ++it) {
314 _socksLib = ll->library((*pit + *it).latin1());
315 if (_socksLib) {
316 if ((_meth == 1 || _meth == 2) &&
317 _socksLib->symbol("S5LogShowThreadIDS") != 0L) { // NEC SOCKS
318 kdDebug(171) << "Found NEC SOCKS" << endl;
319 _st = new KNECSocksTable;
320 _useSocks = true;
321 _hasSocks = true;
322 break;
323 } else if ((_meth == 1 || _meth == 3) &&
324 _socksLib->symbol("sockaddr2ruleaddress") != 0L) { //Dante
325 kdDebug(171) << "Found Dante SOCKS" << endl;
326 _st = new KDanteSocksTable;
327 _useSocks = true;
328 _hasSocks = true;
329 break;
330 } else {
331 _socksLib->unload();
332 _socksLib = 0L;
333 }
334 }
335 }
336
337 // Load in all the symbols
338 if (_st) {
339 for (TQMap<SymbolKeys,TQString>::Iterator it = _st->symbols.begin();
340 it != _st->symbols.end();
341 ++it) {
342 switch(it.key()) {
343 case S_SOCKSinit:
344 F_SOCKSinit = (int (*)(char *))
345 _socksLib->symbol(it.data().latin1());
346 break;
347 case S_connect:
348 F_connect = (int (*)(int, const struct sockaddr *, ksocklen_t))
349 _socksLib->symbol(it.data().latin1());
350 break;
351 case S_read:
352 F_read = (signed long int (*)(int, void *, unsigned long int))
353 _socksLib->symbol(it.data().latin1());
354 break;
355 case S_write:
356 F_write = (signed long int (*)(int, const void *, unsigned long int))
357 _socksLib->symbol(it.data().latin1());
358 break;
359 case S_recvfrom:
360 F_recvfrom = (int (*)(int, void *, unsigned long int, int,
361 struct sockaddr *, ksocklen_t *))
362 _socksLib->symbol(it.data().latin1());
363 break;
364 case S_sendto:
365 F_sendto = (int (*)(int, const void *, unsigned long int, int,
366 const struct sockaddr *, ksocklen_t))
367 _socksLib->symbol(it.data().latin1());
368 break;
369 case S_recv:
370 F_recv = (int (*)(int, void *, unsigned long int, int))
371 _socksLib->symbol(it.data().latin1());
372 break;
373 case S_send:
374 F_send = (int (*)(int, const void *, unsigned long int, int))
375 _socksLib->symbol(it.data().latin1());
376 break;
377 case S_getsockname:
378 F_getsockname = (int (*)(int, struct sockaddr *, ksocklen_t *))
379 _socksLib->symbol(it.data().latin1());
380 break;
381 case S_getpeername:
382 F_getpeername = (int (*)(int, struct sockaddr *, ksocklen_t *))
383 _socksLib->symbol(it.data().latin1());
384 break;
385 case S_accept:
386 F_accept = (int (*)(int, struct sockaddr *, ksocklen_t *))
387 _socksLib->symbol(it.data().latin1());
388 break;
389 case S_select:
390 F_select = (int (*)(int, fd_set *, fd_set *, fd_set *, struct timeval *))
391 _socksLib->symbol(it.data().latin1());
392 break;
393 case S_listen:
394 F_listen = (int (*)(int, int))
395 _socksLib->symbol(it.data().latin1());
396 break;
397 case S_bind:
398 F_bind = (int (*)(int, const struct sockaddr *, ksocklen_t))
399 _socksLib->symbol(it.data().latin1());
400 break;
401 default:
402 kdDebug(171) << "KSocks got a symbol it doesn't know about!" << endl;
403 break;
404 }
405 }
406
407 // Now we check for the critical stuff.
408 if (F_SOCKSinit) {
409 int rc = (*F_SOCKSinit)((char *)"KDE");
410 if (rc != 0)
411 stopSocks();
412 else kdDebug(171) << "SOCKS has been activated!" << endl;
413 } else {
414 stopSocks();
415 }
416 }
417}
418
419
420KSocks::~KSocks() {
421 stopSocks();
422 _me = 0;
423}
424
425void KSocks::die() {
426 if (_me == this) {
427 _me = 0;
428 delete this;
429 }
430}
431
432void KSocks::stopSocks() {
433 if (_hasSocks) {
434 // This library doesn't even provide the basics.
435 // It's probably broken. Let's abort.
436 _useSocks = false;
437 _hasSocks = false;
438 if (_socksLib) {
439 _socksLib->unload();
440 _socksLib = 0L;
441 }
442 delete _st;
443 _st = 0L;
444 }
445}
446
447
448bool KSocks::usingSocks() {
449 return _useSocks;
450}
451
452
453bool KSocks::hasSocks() {
454 return _hasSocks;
455}
456
457
458void KSocks::disableSocks() {
459 _useSocks = false;
460}
461
462
463void KSocks::enableSocks() {
464 if (_hasSocks)
465 _useSocks = true;
466}
467
468bool KSocks::hasWorkingAsyncConnect()
469{
470 return (_useSocks && _st) ? _st->hasWorkingAsyncConnect : true;
471}
472
473
474/*
475 * REIMPLEMENTED FUNCTIONS FROM LIBC
476 *
477 */
478
479int KSocks::connect (int sockfd, const sockaddr *serv_addr,
480 ksocklen_t addrlen) {
481 if (_useSocks && F_connect)
482 return (*F_connect)(sockfd, serv_addr, addrlen);
483 else return ::connect(sockfd, (sockaddr*) serv_addr, (socklen_t)addrlen);
484}
485
486
487signed long int KSocks::read (int fd, void *buf, unsigned long int count) {
488 if (_useSocks && F_read)
489 return (*F_read)(fd, buf, count);
490 else return ::read(fd, buf, count);
491}
492
493
494signed long int KSocks::write (int fd, const void *buf, unsigned long int count) {
495 if (_useSocks && F_write)
496 return (*F_write)(fd, buf, count);
497 else return ::write(fd, buf, count);
498}
499
500
501int KSocks::recvfrom (int s, void *buf, unsigned long int len, int flags,
502 sockaddr *from, ksocklen_t *fromlen) {
503 if (_useSocks && F_recvfrom) {
504 return (*F_recvfrom)(s, buf, len, flags, from, fromlen);
505 } else {
506 socklen_t casted_len = (socklen_t) *fromlen;
507 int rc = ::recvfrom(s, (char*) buf, len, flags, from, &casted_len);
508 *fromlen = casted_len;
509 return rc;
510 }
511}
512
513
514int KSocks::sendto (int s, const void *msg, unsigned long int len, int flags,
515 const sockaddr *to, ksocklen_t tolen) {
516 if (_useSocks && F_sendto)
517 return (*F_sendto)(s, msg, len, flags, to, tolen);
518 else return ::sendto(s, (char*) msg, len, flags, to, (socklen_t)tolen);
519}
520
521
522int KSocks::recv (int s, void *buf, unsigned long int len, int flags) {
523 if (_useSocks && F_recv)
524 return (*F_recv)(s, buf, len, flags);
525 else return ::recv(s, (char*) buf, len, flags);
526}
527
528
529int KSocks::send (int s, const void *msg, unsigned long int len, int flags) {
530 if (_useSocks && F_send)
531 return (*F_send)(s, msg, len, flags);
532 else return ::send(s, (char*) msg, len, flags);
533}
534
535
536int KSocks::getsockname (int s, sockaddr *name, ksocklen_t *namelen) {
537 if (_useSocks && F_getsockname) {
538 return (*F_getsockname)(s, name, namelen);
539 } else {
540 socklen_t casted_len = *namelen;
541 int rc = ::getsockname(s, name, &casted_len);
542 *namelen = casted_len;
543 return rc;
544 }
545}
546
547
548int KSocks::getpeername (int s, sockaddr *name, ksocklen_t *namelen) {
549 if (_useSocks && F_getpeername) {
550 return (*F_getpeername)(s, name, namelen);
551 } else {
552 socklen_t casted_len = *namelen;
553 int rc = ::getpeername(s, name, &casted_len);
554 *namelen = casted_len;
555 return rc;
556 }
557}
558
559
560int KSocks::accept (int s, sockaddr *addr, ksocklen_t *addrlen) {
561 if (_useSocks && F_accept) {
562 return (*F_accept)(s, addr, addrlen);
563 } else {
564 socklen_t casted_len = *addrlen;
565 int rc = ::accept(s, addr, &casted_len);
566 *addrlen = casted_len;
567 return rc;
568 }
569}
570
571
572int KSocks::select (int n, fd_set *readfds, fd_set *writefds,
573 fd_set *exceptfds, struct timeval *timeout) {
574 if (_useSocks && F_select)
575 return (*F_select)(n, readfds, writefds, exceptfds, timeout);
576 else return ::select(n, readfds, writefds, exceptfds, timeout);
577}
578
579
580int KSocks::listen (int s, int backlog) {
581 if (_useSocks && F_listen)
582 return (*F_listen)(s, backlog);
583 else return ::listen(s, backlog);
584}
585
586
587int KSocks::bind (int sockfd, const sockaddr *my_addr, ksocklen_t addrlen) {
588 if (_useSocks && F_bind)
589 return (*F_bind)(sockfd, my_addr, addrlen);
590 else return ::bind(sockfd, my_addr, (socklen_t)addrlen);
591}
592
593int KSocks::bind (int sockfd, sockaddr *my_addr, ksocklen_t addrlen) {
594 if (_useSocks && F_bind)
595 return (*F_bind)(sockfd, my_addr, addrlen);
596 else return ::bind(sockfd, my_addr, (socklen_t)addrlen);
597}
598
599
600
KLibLoader
The KLibLoader allows you to load libraries dynamically at runtime.
Definition: klibloader.h:143
KLibLoader::self
static KLibLoader * self()
Returns a pointer to the factory.
Definition: klibloader.cpp:288
KLibLoader::library
virtual KLibrary * library(const char *libname)
Loads and initializes a library.
Definition: klibloader.cpp:392
KLibrary::unload
void unload() const
Unloads the library.
Definition: klibloader.cpp:200
KLibrary::symbol
void * symbol(const char *name) const
Looks up a symbol from the library.
Definition: klibloader.cpp:181
KSocks
This class provides you with an interface to a SOCKS Proxy server.
Definition: ksocks.h:48
KSocks::getpeername
int getpeername(int s, sockaddr *name, ksocklen_t *namelen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:548
KSocks::write
signed long int write(int fd, const void *buf, unsigned long int count)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:494
KSocks::self
static KSocks * self()
Return an instance of class KSocks *.
Definition: ksocks.cpp:212
KSocks::listen
int listen(int s, int backlog)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:580
KSocks::recvfrom
int recvfrom(int s, void *buf, unsigned long int len, int flags, sockaddr *from, ksocklen_t *fromlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:501
KSocks::getsockname
int getsockname(int s, sockaddr *name, ksocklen_t *namelen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:536
KSocks::die
void die()
If you're using this, you're probably doing something wrong.
Definition: ksocks.cpp:425
KSocks::hasWorkingAsyncConnect
bool hasWorkingAsyncConnect()
Returns whether asynchronous connects work with the selected SOCKS impementation.
Definition: ksocks.cpp:468
KSocks::setConfig
static void setConfig(TDEConfigBase *config)
Set this before the first call to KSocks::self() and it will use config to read its configuration fro...
Definition: ksocks.cpp:226
KSocks::sendto
int sendto(int s, const void *msg, unsigned long int len, int flags, const sockaddr *to, ksocklen_t tolen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:514
KSocks::read
signed long int read(int fd, void *buf, unsigned long int count)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:487
KSocks::disableSocks
void disableSocks()
Disable the use of SOCKS immediately.
Definition: ksocks.cpp:458
KSocks::enableSocks
void enableSocks()
Enable the use of SOCKS immediately if hasSocks() is true.
Definition: ksocks.cpp:463
KSocks::recv
int recv(int s, void *buf, unsigned long int len, int flags)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:522
KSocks::send
int send(int s, const void *msg, unsigned long int len, int flags)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:529
KSocks::hasSocks
bool hasSocks()
Checks whether SOCKS is available for use.
Definition: ksocks.cpp:453
KSocks::bind
int bind(int sockfd, sockaddr *my_addr, ksocklen_t addrlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:593
KSocks::select
int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:572
KSocks::disable
static void disable()
Set this before the first call to KSocks::self() and it will fail to initialize SOCKS.
Definition: ksocks.cpp:206
KSocks::accept
int accept(int s, sockaddr *addr, ksocklen_t *addrlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:560
KSocks::connect
int connect(int sockfd, const sockaddr *serv_addr, ksocklen_t addrlen)
This is the re-implementation of libc's function of the same name.
Definition: ksocks.cpp:479
KSocks::activated
static bool activated()
Checks whether KSocks has been started (ie someone called self())
Definition: ksocks.cpp:239
KSocks::usingSocks
bool usingSocks()
Checks whether SOCKS is currently being used.
Definition: ksocks.cpp:448
KStaticDeleter
Little helper class to clean up static objects that are held as pointer.
Definition: kstaticdeleter.h:74
TDEConfigBase
KDE Configuration Management abstract base class.
Definition: tdeconfigbase.h:71
TDEConfigBase::readNumEntry
int readNumEntry(const TQString &pKey, int nDefault=0) const
Reads a numerical value.
Definition: tdeconfigbase.cpp:613
TDEConfigBase::readBoolEntry
bool readBoolEntry(const TQString &pKey, bool bDefault=false) const
Reads a boolean entry.
Definition: tdeconfigbase.cpp:748
TDEConfigBase::readListEntry
int readListEntry(const TQString &pKey, TQStrList &list, char sep=',') const
Reads a list of strings.
Definition: tdeconfigbase.cpp:467
TDEConfigBase::readPathEntry
TQString readPathEntry(const TQString &pKey, const TQString &aDefault=TQString::null) const
Reads a path.
Definition: tdeconfigbase.cpp:585
TDEConfigGroup
A TDEConfigBase derived class for one specific group in a TDEConfig object.
Definition: tdeconfigbase.h:2127
TDELocale::i18n
TQString i18n(const char *text)
i18n is the function that does everything you need to translate a string.
Definition: tdelocale.cpp:1976
endl
kndbgstream & endl(kndbgstream &s)
Does nothing.
Definition: kdebug.h:583
tdelocale.h

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.