]>
git.saurik.com Git - apt.git/blob - apt-pkg/acquire-worker.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: acquire-worker.h,v 1.10 1999/05/23 06:47:43 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 #pragma interface "apt-pkg/acquire-worker.h"
21 // Interfacing to the method process
22 class pkgAcquire::Worker
29 /* Linked list starting at a Queue and a linked list starting
34 // The access association
36 pkgAcquireStatus
*Log
;
40 // This is the subprocess IPC setup
47 // Various internal things
49 vector
<string
> MessageQueue
;
52 // Private constructor helper
55 // Message handling things
61 // The message handlers
62 bool Capabilities(string Message
);
63 bool SendConfiguration();
64 bool MediaChange(string Message
);
71 // The curent method state
72 pkgAcquire::Queue::QItem
*CurrentItem
;
74 unsigned long CurrentSize
;
75 unsigned long TotalSize
;
76 unsigned long ResumePoint
;
78 // Load the method and do the startup
79 bool QueueItem(pkgAcquire::Queue::QItem
*Item
);
83 Worker(Queue
*OwnerQ
,MethodConfig
*Config
,pkgAcquireStatus
*Log
);
84 Worker(MethodConfig
*Config
);