• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/kpasswdserver
 

tdeio/kpasswdserver

  • tdeio
  • kpasswdserver
kpasswdserver.h
1 /*
2  This file is part of the KDE Password Server
3 
4  Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  version 2 as published by the Free Software Foundation.
9 
10  This software is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this library; see the file COPYING. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 //----------------------------------------------------------------------------
21 //
22 // KDE Password Server
23 // $Id$
24 
25 #ifndef KPASSWDSERVER_H
26 #define KPASSWDSERVER_H
27 
28 #include <tqdict.h>
29 #include <tqintdict.h>
30 
31 #include <dcopclient.h>
32 #include <tdeio/authinfo.h>
33 #include <kded/kdedmodule.h>
34 
35 namespace TDEWallet {
36  class Wallet;
37 }
38 
39 class KPasswdServer : public KDEDModule
40 {
41  Q_OBJECT
42  K_DCOP
43 public:
44  KPasswdServer(const TQCString &);
45  ~KPasswdServer();
46 
47 k_dcop:
48  // KDE4 merge
49  TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long, unsigned long);
50  TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long);
51  TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long, unsigned long);
52  TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long);
53  void addAuthInfo(TDEIO::AuthInfo, long);
54 
55 public slots:
56  void processRequest();
57  // Remove all authentication info associated with windowId
58  void removeAuthForWindowId(long windowId);
59 
60 protected:
61  struct AuthInfo;
62 
63  TQString createCacheKey( const TDEIO::AuthInfo &info );
64  const AuthInfo *findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info);
65  void removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info);
66  void addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
67  TDEIO::AuthInfo copyAuthInfo(const AuthInfo *);
68  void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep);
69  int findWalletEntry( const TQMap<TQString,TQString>& map, const TQString& username );
70  bool openWallet( WId windowId );
71 
72  struct AuthInfo {
73  AuthInfo() { expire = expNever; isCanceled = false; seqNr = 0; }
74 
75  KURL url;
76  TQString directory;
77  TQString username;
78  TQString password;
79  TQString realmValue;
80  TQString digestInfo;
81 
82  enum { expNever, expWindowClose, expTime } expire;
83  TQValueList<long> windowList;
84  unsigned long expireTime;
85  long seqNr;
86 
87  bool isCanceled;
88  };
89 
90  class AuthInfoList : public TQPtrList<AuthInfo>
91  {
92  public:
93  AuthInfoList() { setAutoDelete(true); }
94  int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2);
95  };
96 
97  TQDict< AuthInfoList > m_authDict;
98 
99  struct Request {
100  DCOPClient *client;
101  DCOPClientTransaction *transaction;
102  TQString key;
103  TDEIO::AuthInfo info;
104  TQString errorMsg;
105  long windowId;
106  long seqNr;
107  bool prompt;
108  };
109 
110  TQPtrList< Request > m_authPending;
111  TQPtrList< Request > m_authWait;
112  TQIntDict<TQStringList> mWindowIdList;
113  DCOPClient *m_dcopClient;
114  TDEWallet::Wallet* m_wallet;
115  long m_seqNr;
116 };
117 
118 #endif
TDEWallet
Definition: kpasswdserver.h:35

tdeio/kpasswdserver

Skip menu "tdeio/kpasswdserver"
  • Main Page
  • File List

tdeio/kpasswdserver

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