summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire-worker.h')
-rw-r--r--apt-pkg/acquire-worker.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h
index f01c935ae..28072373f 100644
--- a/apt-pkg/acquire-worker.h
+++ b/apt-pkg/acquire-worker.h
@@ -1,10 +1,12 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.h,v 1.1 1998/10/15 06:59:59 jgg Exp $
+// $Id: acquire-worker.h,v 1.2 1998/10/20 02:39:14 jgg Exp $
/* ######################################################################
Acquire Worker - Worker process manager
+ Each worker class is associated with exaclty one subprocess.
+
##################################################################### */
/*}}}*/
#ifndef PKGLIB_ACQUIRE_WORKER_H
@@ -20,18 +22,40 @@
class pkgAcquire::Worker
{
protected:
+ friend Queue;
+
+ Worker *Next;
+ // The access association
Queue *OwnerQ;
- MethodConfig *Config;
- Worker *Next;
+ MethodConfig *Config;
+ string Access;
+
+ // This is the subprocess IPC setup
+ pid_t Process;
+ int InFd;
+ int OutFd;
- friend Queue;
+ // Various internal things
+ bool Debug;
+ vector<string> MessageQueue;
+
+ // Private constructor helper
+ void Construct();
+
+ // Message handling things
+ bool ReadMessages();
+ bool RunMessages();
+
+ // The message handlers
+ bool Capabilities(string Message);
public:
- bool Create();
+ // Load the method and do the startup
+ bool Start();
- Worker(Queue *OwnerQ);
+ Worker(Queue *OwnerQ,string Access);
Worker(MethodConfig *Config);
~Worker();
};