]>
git.saurik.com Git - apt.git/blob - methods/rsh.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/// $Id: rsh.h,v 1.4 2002/11/09 23:33:26 doogie Exp $
3 // $Id: rsh.h,v 1.4 2002/11/09 23:33:26 doogie Exp $
4 /* ######################################################################
6 RSH method - Transfer files via rsh compatible program
8 ##################################################################### */
16 #include <apt-pkg/strutl.h>
28 std::string
const Prog
;
30 // Private helper functions
31 bool ReadLine(std::string
&Text
);
38 bool WriteMsg(std::string
&Text
,bool Sync
,const char *Fmt
,...);
39 bool Connect(std::string Host
, std::string User
);
40 bool Connect(std::string Host
, unsigned int Port
, std::string User
);
41 bool Comp(URI Other
) const {return Other
.Host
== ServerName
.Host
&& Other
.Port
== ServerName
.Port
;};
48 bool Size(const char *Path
,unsigned long long &Size
);
49 bool ModTime(const char *Path
, time_t &Time
);
50 bool Get(const char *Path
,FileFd
&To
,unsigned long long Resume
,
51 Hashes
&Hash
,bool &Missing
, unsigned long long Size
);
53 RSHConn(std::string
const &Prog
, URI Srv
);
57 #include "aptmethod.h"
59 class RSHMethod
: public aptMethod
61 virtual bool Fetch(FetchItem
*Itm
) APT_OVERRIDE
;
62 virtual bool Configuration(std::string Message
) APT_OVERRIDE
;
66 static std::string FailFile
;
68 static time_t FailTime
;
69 static APT_NORETURN
void SigTerm(int);
73 explicit RSHMethod(std::string
&&Prog
);