apt
0.9.7.5ubuntu5.1
Main Page
Related Pages
Modules
Classes
Files
File List
apt-pkg
acquire-worker.h
Go to the documentation of this file.
1
// -*- mode: cpp; mode: fold -*-
2
// Description /*{{{*/
3
// $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
4
/* ######################################################################
5
6
Acquire Worker - Worker process manager
7
8
Each worker class is associated with exaclty one subprocess.
9
10
##################################################################### */
11
/*}}}*/
12
19
#ifndef PKGLIB_ACQUIRE_WORKER_H
20
#define PKGLIB_ACQUIRE_WORKER_H
21
22
#include <
apt-pkg/acquire.h
>
23
#include <apt-pkg/weakptr.h>
24
25
45
class
pkgAcquire::Worker
:
public
WeakPointable
46
{
48
void
*d;
49
50
friend
class
pkgAcquire
;
51
52
protected
:
53
friend
class
Queue
;
54
59
Worker
*
NextQueue
;
60
62
Worker
*
NextAcquire
;
63
65
Queue
*
OwnerQ
;
66
70
pkgAcquireStatus
*
Log
;
71
76
MethodConfig
*
Config
;
77
82
std::string
Access
;
83
85
pid_t
Process
;
86
92
int
InFd
;
93
99
int
OutFd
;
100
106
bool
InReady
;
107
113
bool
OutReady
;
114
116
bool
Debug
;
117
121
std::vector<std::string>
MessageQueue
;
122
127
std::string
OutQueue
;
128
135
void
Construct
();
136
147
bool
ReadMessages
();
148
158
bool
RunMessages
();
159
166
bool
InFdReady
();
167
175
bool
OutFdReady
();
176
186
bool
Capabilities
(std::string Message);
187
204
bool
SendConfiguration
();
205
217
bool
MediaChange
(std::string Message);
218
228
bool
MethodFailure
();
229
235
void
ItemDone
();
236
237
public
:
238
240
pkgAcquire::Queue::QItem
*
CurrentItem
;
241
245
std::string
Status
;
246
250
unsigned
long
long
CurrentSize
;
251
255
unsigned
long
long
TotalSize
;
256
260
unsigned
long
long
ResumePoint
;
261
271
bool
QueueItem
(
pkgAcquire::Queue::QItem
*
Item
);
272
280
bool
Start
();
281
285
void
Pulse
();
286
288
inline
const
MethodConfig
*
GetConf
()
const
{
return
Config
;};
289
301
Worker
(
Queue
*
OwnerQ
,
MethodConfig
*
Config
,
pkgAcquireStatus
*
Log
);
302
313
Worker
(
MethodConfig
*
Config
);
314
320
virtual
~Worker
();
321
};
322
325
#endif
Generated on Wed Mar 13 2013 21:26:33 for apt by
1.8.1.2