# class NetRC

###

Module | kio
Namespace | KIO
Class | NetRC
Inherits |

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 Author Dawit Alemayehu <adawit@kde.org>

### enums

- LookUpModeFlag { exactOnly, defaultOnly, presetOnly }

enum details

### methods

- NetRC ( )

  returns ctor
  Not implemented

- NetRC ( )

  returns dtor
  Not implemented

- extract (a0, a1, a2)

  returns QString
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | char |
  a1 | char |
  a2 | int |

- lookup (url, login, userealnetrc, type, mode)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  url | KUrl |
  login | KIO::NetRC.AutoLogin |
  userealnetrc | bool | 0
  type | QString | QString()
  mode | KIO::NetRC.LookUpMode | KIO.NetRC.LookUpMode(KIO.NetRC.exactOnly)|KIO.NetRC.defaultOnly

  Looks up the login information for the given url.

  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

- openf (a0)

  returns int

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- parse (a0)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  a0 | int |

- reload ( )

  returns Nothing

  Reloads the auto login information.

- self ( )

  returns KIO.NetRC
  static

### enums - detail

- LookUpModeFlag { exactOnly, defaultOnly, presetOnly }

  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

| exactOnly | - 0x0002 | - |
| defaultOnly | - 0x0004 | - |
| presetOnly | - 0x0008 | - |