KIO
KIO::NetRC Class Reference
A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. More...
#include <authinfo.h>
Classes | |
struct | AutoLogin |
Contains auto login information. More... | |
Public Types | |
enum | LookUpModeFlag { exactOnly = 0x0002, defaultOnly = 0x0004, presetOnly = 0x0008 } |
Public Member Functions | |
bool | lookup (const KUrl &url, AutoLogin &login, bool userealnetrc=false, const QString &type=QString(), LookUpMode mode=LookUpMode(exactOnly)|defaultOnly) |
void | reload () |
Static Public Member Functions | |
static NetRC * | self () |
Protected Member Functions | |
QString | extract (const char *, const char *, int &) |
int | openf (const QString &) |
bool | parse (int) |
Detailed Description
A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes.This is only meant to address backward compatibility with old automated ftp client style logins...
An interface to the ftp .netrc files
Definition at line 293 of file authinfo.h.
Member Enumeration Documentation
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 307 of file authinfo.h.
Member Function Documentation
QString NetRC::extract | ( | const char * | buf, | |
const char * | key, | |||
int & | pos | |||
) | [protected] |
Definition at line 313 of file authinfo.cpp.
bool NetRC::lookup | ( | const KUrl & | url, | |
AutoLogin & | login, | |||
bool | userealnetrc = false , |
|||
const QString & | type = QString() , |
|||
LookUpMode | mode = LookUpMode(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 takenmode the LookUpMode flags (ORed) for the query
Definition at line 216 of file authinfo.cpp.
int NetRC::openf | ( | const QString & | f | ) | [protected] |
Definition at line 298 of file authinfo.cpp.
bool NetRC::parse | ( | int | fd | ) | [protected] |
Definition at line 348 of file authinfo.cpp.
void NetRC::reload | ( | ) |
NetRC * NetRC::self | ( | ) | [static] |
A reference to the instance of the class.
- Returns:
- the class
Definition at line 209 of file authinfo.cpp.
The documentation for this class was generated from the following files: