summaryrefslogtreecommitdiff
path: root/methods/file.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:16 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:16 +0000
commitbe4401bfa4a240bbc894e1bfeb1e1e8d63fc7b18 (patch)
tree3d48bdf9a7abff3b51c02323ea1ed26767d576d7 /methods/file.cc
parentf0a53b6301cd1f5d0878f2d6ed21811d70a86f9a (diff)
New http method
Author: jgg Date: 1998-11-01 05:27:29 GMT New http method
Diffstat (limited to 'methods/file.cc')
-rw-r--r--methods/file.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/methods/file.cc b/methods/file.cc
index 64490749b..0e5e2ebef 100644
--- a/methods/file.cc
+++ b/methods/file.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: file.cc,v 1.4 1998/10/30 07:53:52 jgg Exp $
+// $Id: file.cc,v 1.5 1998/11/01 05:27:41 jgg Exp $
/* ######################################################################
File URI method for APT
@@ -22,7 +22,7 @@
class FileMethod : public pkgAcqMethod
{
- virtual bool Fetch(string Message,URI Get);
+ virtual bool Fetch(FetchItem *Itm);
public:
@@ -32,8 +32,9 @@ class FileMethod : public pkgAcqMethod
// FileMethod::Fetch - Fetch a file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool FileMethod::Fetch(string Message,URI Get)
+bool FileMethod::Fetch(FetchItem *Itm)
{
+ URI Get = Itm->Uri;
string File = Get.Path;
FetchResult Res;
@@ -45,7 +46,7 @@ bool FileMethod::Fetch(string Message,URI Get)
Res.Filename = File;
Res.LastModified = Buf.st_mtime;
Res.IMSHit = false;
- if (LastModified == Buf.st_mtime)
+ if (Itm->LastModified == Buf.st_mtime)
Res.IMSHit = true;
}
@@ -61,7 +62,7 @@ bool FileMethod::Fetch(string Message,URI Get)
AltRes.Filename = File;
AltRes.LastModified = Buf.st_mtime;
AltRes.IMSHit = false;
- if (LastModified == Buf.st_mtime)
+ if (Itm->LastModified == Buf.st_mtime)
AltRes.IMSHit = true;
URIDone(Res,&AltRes);