]>
git.saurik.com Git - apt.git/blob - apt-pkg/acquire-worker.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
4 /* ######################################################################
6 Acquire Worker - Worker process manager
8 Each worker class is associated with exaclty one subprocess.
10 ##################################################################### */
12 #ifndef PKGLIB_ACQUIRE_WORKER_H
13 #define PKGLIB_ACQUIRE_WORKER_H
15 #include <apt-pkg/acquire.h>
18 // Interfacing to the method process
19 class pkgAcquire::Worker
21 friend class pkgAcquire
;
26 /* Linked list starting at a Queue and a linked list starting
31 // The access association
33 pkgAcquireStatus
*Log
;
37 // This is the subprocess IPC setup
44 // Various internal things
46 vector
<string
> MessageQueue
;
49 // Private constructor helper
52 // Message handling things
58 // The message handlers
59 bool Capabilities(string Message
);
60 bool SendConfiguration();
61 bool MediaChange(string Message
);
68 // The curent method state
69 pkgAcquire::Queue::QItem
*CurrentItem
;
71 unsigned long CurrentSize
;
72 unsigned long TotalSize
;
73 unsigned long ResumePoint
;
75 // Load the method and do the startup
76 bool QueueItem(pkgAcquire::Queue::QItem
*Item
);
79 inline const MethodConfig
*GetConf() const {return Config
;};
81 Worker(Queue
*OwnerQ
,MethodConfig
*Config
,pkgAcquireStatus
*Log
);
82 Worker(MethodConfig
*Config
);