kio Library API Documentation

KIO::NetRC Class Reference

A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. An interface to the ftp .netrc files. More...

#include <authinfo.h>

List of all members.

Public Types

enum  LookUpMode

Public Methods

bool lookup (const KURL &url, AutoLogin &login, bool userealnetrc=false, QString type=QString::null, int mode=(exactOnly|defaultOnly))
void reload ()

Static Public Methods

NetRC * self ()


Detailed Description

A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. An interface to the ftp .netrc files.

This is only meant to address backward compatability with old automated ftp client style logins...

Author:
Dawit Alemayehu <adawit@kde.org>

Definition at line 240 of file authinfo.h.


Member Enumeration Documentation

enum KIO::NetRC::LookUpMode
 

Specifies the mode to be used when searching for a matching automatic login info for a given site :.

  • exactOnly search entries with exact host name matches.
  • defaultOnly search entries that are specified as "default".
  • presetOnly search entries that are specified as "preset".
See also:
lookup

Definition at line 254 of file authinfo.h.


Member Function Documentation

NetRC * NetRC::self   [static]
 

A reference to the instance of the class.

Returns:
the class

Definition at line 114 of file authinfo.cpp.

bool NetRC::lookup const KURL   url,
AutoLogin   login,
bool    userealnetrc = false,
QString    type = QString::null,
int    mode = (exactOnly|defaultOnly)
 

Looks up the login information for the given url.

Parameters:
url  the url whose login information will be checked
login  the login information will be writte here
userealnetrc  if true, use $HOME/.netrc fle
type  the type of the login. If null, the url's protocol will be taken
mode  the LookUpMode flags (ORed) for the query

Definition at line 121 of file authinfo.cpp.

References QValueList::begin(), QMap< QString, LoginList >::clear(), QMap< QString, LoginList >::contains(), QValueList::end(), QString::fromLatin1(), QDir::homeDirPath(), KURL::host(), QValueList::isEmpty(), QMap< QString, LoginList >::isEmpty(), QString::isEmpty(), KURL::isValid(), KIO::NetRC::AutoLogin::login, KIO::NetRC::AutoLogin::macdef, KIO::NetRC::AutoLogin::machine, KIO::NetRC::AutoLogin::password, KURL::protocol(), QDir::separator(), and KIO::NetRC::AutoLogin::type.

void KIO::NetRC::reload   [inline]
 

Reloads the auto login information.

Definition at line 297 of file authinfo.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 22 14:24:21 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003