apt @VERSION@
|
00001 // -*- mode: cpp; mode: fold -*- 00002 // Description /*{{{*/ 00003 // $Id: netrc.h,v 1.11 2004/01/07 09:19:35 bagder Exp $ 00004 /* ###################################################################### 00005 00006 netrc file parser - returns the login and password of a give host in 00007 a specified netrc-type file 00008 00009 Originally written by Daniel Stenberg, <daniel@haxx.se>, et al. and 00010 placed into the Public Domain, do with it what you will. 00011 00012 ##################################################################### */ 00013 /*}}}*/ 00014 #ifndef NETRC_H 00015 #define NETRC_H 00016 00017 #include <apt-pkg/strutl.h> 00018 00019 #define DOT_CHAR "." 00020 #define DIR_CHAR "/" 00021 00022 // Assume: password[0]=0, host[0] != 0. 00023 // If login[0] = 0, search for login and password within a machine section 00024 // in the netrc. 00025 // If login[0] != 0, search for password within machine and login. 00026 int parsenetrc (char *host, char *login, char *password, char *filename); 00027 00028 void maybe_add_auth (URI &Uri, string NetRCFile); 00029 #endif