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

tdeio/tdeio

  • tdeio
  • tdeio
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 __TDEIO_AUTHINFO_H
22#define __TDEIO_AUTHINFO_H
23
24#include <tqmap.h>
25#include <tqvaluelist.h>
26#include <kurl.h>
27
28
29namespace TDEIO {
30
51class TDEIO_EXPORT AuthInfo
52{
53 TDEIO_EXPORT friend TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
54 TDEIO_EXPORT friend TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
55
56public:
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
222protected:
223 bool modified;
224private:
225 class AuthInfoPrivate* d;
226};
227
228TDEIO_EXPORT TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
229TDEIO_EXPORT TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
230
240class TDEIO_EXPORT NetRC
241{
242public:
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
299protected:
300 TQString extract( const char*, const char*, int& );
301 int openf( const TQString& );
302 bool parse( int );
303
304private:
305 NetRC();
306 ~NetRC();
307
308private:
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
TDEIO::AuthInfo
This class is intended to make it easier to prompt for, cache and retrieve authorization information.
Definition authinfo.h:52
TDEIO::AuthInfo::username
TQString username
This is required for caching.
Definition authinfo.h:99
TDEIO::AuthInfo::prompt
TQString prompt
Information to be displayed when prompting the user for authentication information.
Definition authinfo.h:115
TDEIO::AuthInfo::commentLabel
TQString commentLabel
Descriptive label to be displayed in front of the comment when prompting the user for password.
Definition authinfo.h:159
TDEIO::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
TDEIO::AuthInfo::comment
TQString comment
Additional comment to be displayed when prompting the user for authentication information.
Definition authinfo.h:150
TDEIO::AuthInfo::url
KURL url
The URL for which authentication is to be stored.
Definition authinfo.h:94
TDEIO::AuthInfo::digestInfo
TQString digestInfo
Field to store any extra authentication information for protocols that need it (ex: http).
Definition authinfo.h:187
TDEIO::AuthInfo::password
TQString password
This is required for caching.
Definition authinfo.h:104
TDEIO::AuthInfo::realmValue
TQString realmValue
A unique identifier that allows caching of multiple passwords for different resources in the same ser...
Definition authinfo.h:177
TDEIO::AuthInfo::keepPassword
bool keepPassword
Flag to indicate the persistence of the given password.
Definition authinfo.h:220
TDEIO::AuthInfo::caption
TQString caption
The text to displayed in the title bar of the password prompting dialog.
Definition authinfo.h:126
TDEIO::AuthInfo::isModified
bool isModified() const
Use this method to check if the object was modified.
Definition authinfo.h:76
TDEIO::AuthInfo::setModified
void setModified(bool flag)
Use this method to indicate that this object has been modified.
Definition authinfo.h:82
TDEIO::AuthInfo::readOnly
bool readOnly
Flag which if set forces the username field to be read-only.
Definition authinfo.h:207
TDEIO::NetRC
A Singleton class that provides access to passwords stored in .netrc files for automatic login purpos...
Definition authinfo.h:241
TDEIO::NetRC::LookUpMode
LookUpMode
Specifies the mode to be used when searching for a matching automatic login info for a given site :
Definition authinfo.h:255
TDEIO::NetRC::reload
void reload()
Reloads the auto login information.
Definition authinfo.h:297
TDEIO
A namespace for TDEIO globals.
Definition authinfo.h:29
TDEIO::NetRC::AutoLogin
Contains auto login information.
Definition authinfo.h:266

tdeio/tdeio

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

tdeio/tdeio

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