25 #ifndef KPASSWDSERVER_H
26 #define KPASSWDSERVER_H
29 #include <tqintdict.h>
31 #include <dcopclient.h>
32 #include <tdeio/authinfo.h>
33 #include <kded/kdedmodule.h>
39 class KPasswdServer :
public KDEDModule
44 KPasswdServer(
const TQCString &);
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);
56 void processRequest();
58 void removeAuthForWindowId(
long windowId);
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 );
73 AuthInfo() { expire = expNever; isCanceled =
false; seqNr = 0; }
82 enum { expNever, expWindowClose, expTime } expire;
83 TQValueList<long> windowList;
84 unsigned long expireTime;
90 class AuthInfoList :
public TQPtrList<AuthInfo>
93 AuthInfoList() { setAutoDelete(
true); }
94 int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2);
97 TQDict< AuthInfoList > m_authDict;
101 DCOPClientTransaction *transaction;
103 TDEIO::AuthInfo info;
110 TQPtrList< Request > m_authPending;
111 TQPtrList< Request > m_authWait;
112 TQIntDict<TQStringList> mWindowIdList;
113 DCOPClient *m_dcopClient;
114 TDEWallet::Wallet* m_wallet;