summaryrefslogtreecommitdiff
path: root/methods/nshttp.h
diff options
context:
space:
mode:
authorCoolStar <coolstarorganization@gmail.com>2019-05-02 01:02:42 -0700
committerSam Bingner <sam@bingner.com>2019-12-26 15:24:16 -1000
commitd784ec66fa0019ae1b359578a85488649fdbd621 (patch)
treec6f902c34d81b7326084fff2aac4ec31889a8362 /methods/nshttp.h
parent713b65be84830af1a57148b44dc1d1d4010ece3e (diff)
1.8.0-Sileosille-apt
Diffstat (limited to 'methods/nshttp.h')
-rw-r--r--methods/nshttp.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/methods/nshttp.h b/methods/nshttp.h
new file mode 100644
index 000000000..d0a7c8c31
--- /dev/null
+++ b/methods/nshttp.h
@@ -0,0 +1,40 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/* ######################################################################
+
+ HTTP method - Transfer files via rsh compatible program
+
+ ##################################################################### */
+ /*}}}*/
+#ifndef APT_NSHTTP_H
+#define APT_NSHTTP_H
+
+#include <string>
+#include <time.h>
+
+#include <apt-pkg/strutl.h>
+#include <Foundation/Foundation.h>
+
+class Hashes;
+class FileFd;
+
+#include "aptmethod.h"
+
+class HttpMethod : public aptMethod
+{
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
+
+ NSURLSession *session;
+
+ static std::string FailFile;
+ static int FailFd;
+ static time_t FailTime;
+ static APT_NORETURN void SigTerm(int);
+
+ public:
+
+ explicit HttpMethod(std::string &&Prog);
+};
+
+#endif