• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeioslave/http
 

tdeioslave/http

  • tdeioslave
  • http
  • kcookiejar
main.cpp
1/*
2This file is part of KDE
3
4 Copyright (C) 1998-2000 Waldo Bastian (bastian@kde.org)
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/
23
24#include <dcopclient.h>
25#include <tdecmdlineargs.h>
26#include <tdelocale.h>
27#include <tdeapplication.h>
28
29static const char description[] =
30 I18N_NOOP("HTTP Cookie Daemon");
31
32static const char version[] = "1.0";
33
34static const TDECmdLineOptions options[] =
35{
36 { "shutdown", I18N_NOOP("Shut down cookie jar"), 0 },
37 { "remove <domain>", I18N_NOOP("Remove cookies for domain"), 0 },
38 { "remove-all", I18N_NOOP("Remove all cookies"), 0 },
39 { "reload-config", I18N_NOOP("Reload configuration file"), 0 },
40 TDECmdLineLastOption
41};
42
43extern "C" TDE_EXPORT int kdemain(int argc, char *argv[])
44{
45 TDELocale::setMainCatalogue("tdelibs");
46 TDECmdLineArgs::init(argc, argv, "kcookiejar", I18N_NOOP("HTTP cookie daemon"),
47 description, version);
48
49 TDECmdLineArgs::addCmdLineOptions( options );
50
51 TDEInstance a("kcookiejar");
52
53 tdeApp->dcopClient()->attach();
54
55 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
56 TQCString replyType;
57 TQByteArray replyData;
58 if (args->isSet("remove-all"))
59 {
60 tdeApp->dcopClient()->call( "kded", "kcookiejar", "deleteAllCookies()", TQByteArray(), replyType, replyData);
61 }
62 if (args->isSet("remove"))
63 {
64 TQString domain = args->getOption("remove");
65 TQByteArray params;
66 TQDataStream stream(params, IO_WriteOnly);
67 stream << domain;
68 tdeApp->dcopClient()->call( "kded", "kcookiejar", "deleteCookiesFromDomain(TQString)", params, replyType, replyData);
69 }
70 if (args->isSet("shutdown"))
71 {
72 TQCString module = "kcookiejar";
73 TQByteArray params;
74 TQDataStream stream(params, IO_WriteOnly);
75 stream << module;
76 tdeApp->dcopClient()->call( "kded", "kded", "unloadModule(TQCString)", params, replyType, replyData);
77 }
78 else if(args->isSet("reload-config"))
79 {
80 tdeApp->dcopClient()->call( "kded", "kcookiejar", "reloadPolicy()", TQByteArray(), replyType, replyData);
81 }
82 else
83 {
84 TQCString module = "kcookiejar";
85 TQByteArray params;
86 TQDataStream stream(params, IO_WriteOnly);
87 stream << module;
88 tdeApp->dcopClient()->call( "kded", "kded", "loadModule(TQCString)", params, replyType, replyData);
89 }
90
91 return 0;
92}

tdeioslave/http

Skip menu "tdeioslave/http"
  • Main Page
  • Alphabetical List
  • Class List
  • File List

tdeioslave/http

Skip menu "tdeioslave/http"
  • 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 tdeioslave/http by doxygen 1.9.4
This website is maintained by Timothy Pearson.