• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
authinfo.h
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __KIO_AUTHINFO_H
22 #define __KIO_AUTHINFO_H
23 
24 #include <tqmap.h>
25 #include <tqvaluelist.h>
26 #include <kurl.h>
27 
28 
29 namespace KIO {
30 
51 class KIO_EXPORT AuthInfo
52 {
53  KIO_EXPORT friend TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
54  KIO_EXPORT friend TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
55 
56 public:
60  AuthInfo();
61 
65  AuthInfo( const AuthInfo& info );
66 
70  AuthInfo& operator=( const AuthInfo& info );
71 
76  bool isModified() const { return modified; }
77 
82  void setModified( bool flag ) { modified = flag; }
83 
94  KURL url;
95 
99  TQString username;
100 
104  TQString password;
105 
115  TQString prompt;
116 
126  TQString caption;
127 
150  TQString comment;
151 
159  TQString commentLabel;
160 
177  TQString realmValue;
178 
187  TQString digestInfo;
188 
200  bool verifyPath;
201 
207  bool readOnly;
208 
220  bool keepPassword;
221 
222 protected:
223  bool modified;
224 private:
225  class AuthInfoPrivate* d;
226 };
227 
228 KIO_EXPORT TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
229 KIO_EXPORT TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
230 
240 class KIO_EXPORT NetRC
241 {
242 public:
243 
254  enum LookUpMode
255  {
256  exactOnly = 0x0002,
257  defaultOnly = 0x0004,
258  presetOnly = 0x0008
259  };
260 
265  struct AutoLogin
266  {
267  TQString type;
268  TQString machine;
269  TQString login;
270  TQString password;
271  TQMap<TQString, TQStringList> macdef;
272  };
273 
278  static NetRC* self();
279 
290  bool lookup( const KURL& url, AutoLogin& login,
291  bool userealnetrc = false,
292  TQString type = TQString::null,
293  int mode = (exactOnly|defaultOnly) );
297  void reload() { isDirty = true; }
298 
299 protected:
300  TQString extract( const char*, const char*, int& );
301  int openf( const TQString& );
302  bool parse( int );
303 
304 private:
305  NetRC();
306  ~NetRC();
307 
308 private:
309  bool isDirty;
310 
311  typedef TQValueList<AutoLogin> LoginList;
312  typedef TQMap<TQString, LoginList> LoginMap;
313  LoginMap loginMap;
314 
315  static NetRC* instance;
316  class NetRCPrivate;
317  NetRCPrivate* d;
318 };
319 }
320 #endif
KIO::AuthInfo::prompt
TQString prompt
Information to be displayed when prompting the user for authentication information.
Definition: authinfo.h:115
KIO::AuthInfo::keepPassword
bool keepPassword
Flag to indicate the persistence of the given password.
Definition: authinfo.h:220
KIO
A namespace for KIO globals.
Definition: authinfo.h:29
KIO::AuthInfo::caption
TQString caption
The text to displayed in the title bar of the password prompting dialog.
Definition: authinfo.h:126
KIO::AuthInfo
This class is intended to make it easier to prompt for, cache and retrieve authorization information...
Definition: authinfo.h:51
KIO::AuthInfo::readOnly
bool readOnly
Flag which if set forces the username field to be read-only.
Definition: authinfo.h:207
KIO::AuthInfo::isModified
bool isModified() const
Use this method to check if the object was modified.
Definition: authinfo.h:76
KIO::AuthInfo::realmValue
TQString realmValue
A unique identifier that allows caching of multiple passwords for different resources in the same ser...
Definition: authinfo.h:177
KIO::AuthInfo::url
KURL url
The URL for which authentication is to be stored.
Definition: authinfo.h:94
KIO::AuthInfo::commentLabel
TQString commentLabel
Descriptive label to be displayed in front of the comment when prompting the user for password...
Definition: authinfo.h:159
KIO::AuthInfo::verifyPath
bool verifyPath
Flag that, if set, indicates whether a path match should be performed when requesting for cached auth...
Definition: authinfo.h:200
KIO::AuthInfo::comment
TQString comment
Additional comment to be displayed when prompting the user for authentication information.
Definition: authinfo.h:150
KIO::AuthInfo::setModified
void setModified(bool flag)
Use this method to indicate that this object has been modified.
Definition: authinfo.h:82
KIO::AuthInfo::digestInfo
TQString digestInfo
Field to store any extra authentication information for protocols that need it (ex: http)...
Definition: authinfo.h:187
KIO::NetRC::reload
void reload()
Reloads the auto login information.
Definition: authinfo.h:297
KIO::NetRC
A Singleton class that provides access to passwords stored in .netrc files for automatic login purpos...
Definition: authinfo.h:240
KIO::NetRC::LookUpMode
LookUpMode
Specifies the mode to be used when searching for a matching automatic login info for a given site : ...
Definition: authinfo.h:254
KIO::AuthInfo::password
TQString password
This is required for caching.
Definition: authinfo.h:104
KIO::AuthInfo::username
TQString username
This is required for caching.
Definition: authinfo.h:99
KIO::NetRC::AutoLogin
Contains auto login information.
Definition: authinfo.h:265

kio/kio

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

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |