netrc.h 984 B

123456789101112131415161718192021222324252627282930
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: netrc.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
  4. /* ######################################################################
  5. netrc file parser - returns the login and password of a give host in
  6. a specified netrc-type file
  7. Originally written by Daniel Stenberg, <daniel@haxx.se>, et al. and
  8. placed into the Public Domain, do with it what you will.
  9. ##################################################################### */
  10. /*}}}*/
  11. #ifndef NETRC_H
  12. #define NETRC_H
  13. #include <apt-pkg/strutl.h>
  14. #define DOT_CHAR "."
  15. #define DIR_CHAR "/"
  16. // Assume: password[0]=0, host[0] != 0.
  17. // If login[0] = 0, search for login and password within a machine section
  18. // in the netrc.
  19. // If login[0] != 0, search for password within machine and login.
  20. int parsenetrc (char *host, char *login, char *password, char *filename);
  21. void maybe_add_auth (URI &Uri, std::string NetRCFile);
  22. #endif