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

tdeio/kpasswdserver

kpasswdserver.h
00001 /*
00002     This file is part of the KDE Password Server
00003 
00004     Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU General Public License
00008     version 2 as published by the Free Software Foundation.
00009 
00010     This software is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this library; see the file COPYING. If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 //----------------------------------------------------------------------------
00021 //
00022 // KDE Password Server
00023 // $Id$
00024 
00025 #ifndef KPASSWDSERVER_H
00026 #define KPASSWDSERVER_H
00027 
00028 #include <tqdict.h>
00029 #include <tqintdict.h>
00030 
00031 #include <dcopclient.h>
00032 #include <tdeio/authinfo.h>
00033 #include <kded/kdedmodule.h>
00034 
00035 namespace TDEWallet {
00036     class Wallet;
00037 }
00038 
00039 class KPasswdServer : public KDEDModule
00040 {
00041   Q_OBJECT
00042   K_DCOP
00043 public:
00044   KPasswdServer(const TQCString &);
00045   ~KPasswdServer();
00046 
00047 k_dcop:
00048   // KDE4 merge
00049   TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long, unsigned long);
00050   TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long);
00051   TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long, unsigned long);
00052   TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long);
00053   void addAuthInfo(TDEIO::AuthInfo, long);
00054 
00055 public slots:
00056   void processRequest();
00057   // Remove all authentication info associated with windowId
00058   void removeAuthForWindowId(long windowId);
00059 
00060 protected:
00061   struct AuthInfo;
00062 
00063   TQString createCacheKey( const TDEIO::AuthInfo &info );
00064   const AuthInfo *findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info);
00065   void removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info);
00066   void addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
00067   TDEIO::AuthInfo copyAuthInfo(const AuthInfo *);
00068   void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep);
00069   int findWalletEntry( const TQMap<TQString,TQString>& map, const TQString& username );
00070   bool openWallet( WId windowId );
00071 
00072   struct AuthInfo {
00073     AuthInfo() { expire = expNever; isCanceled = false; seqNr = 0; }
00074 
00075     KURL url;
00076     TQString directory;
00077     TQString username;
00078     TQString password;
00079     TQString realmValue;
00080     TQString digestInfo;
00081 
00082     enum { expNever, expWindowClose, expTime } expire;
00083     TQValueList<long> windowList;
00084     unsigned long expireTime;
00085     long seqNr;
00086 
00087     bool isCanceled;
00088   };
00089 
00090   class AuthInfoList : public TQPtrList<AuthInfo>
00091   {
00092     public:
00093       AuthInfoList() { setAutoDelete(true); }
00094       int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2);
00095   };
00096 
00097   TQDict< AuthInfoList > m_authDict;
00098 
00099   struct Request {
00100      DCOPClient *client;
00101      DCOPClientTransaction *transaction;
00102      TQString key;
00103      TDEIO::AuthInfo info;
00104      TQString errorMsg;
00105      long windowId;
00106      long seqNr;
00107      bool prompt;
00108   };
00109 
00110   TQPtrList< Request > m_authPending;
00111   TQPtrList< Request > m_authWait;
00112   TQIntDict<TQStringList> mWindowIdList;
00113   DCOPClient *m_dcopClient;
00114   TDEWallet::Wallet* m_wallet;
00115   long m_seqNr;
00116 };
00117 
00118 #endif

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
  • 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 tdeio/kpasswdserver by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.