Code Search for Developers
 
 
  

acquire-worker.h from GreenSocs at Krugle


Show acquire-worker.h syntax highlighted

// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################

   Acquire Worker - Worker process manager
   
   Each worker class is associated with exaclty one subprocess.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_ACQUIRE_WORKER_H
#define PKGLIB_ACQUIRE_WORKER_H

#include <apt-pkg/acquire.h>

#ifdef __GNUG__
#pragma interface "apt-pkg/acquire-worker.h"
#endif 

// Interfacing to the method process
class pkgAcquire::Worker
{
   friend class pkgAcquire;
   
   protected:
   friend class Queue;

   /* Linked list starting at a Queue and a linked list starting
      at Acquire */
   Worker *NextQueue;
   Worker *NextAcquire;
   
   // The access association
   Queue *OwnerQ;
   pkgAcquireStatus *Log;
   MethodConfig *Config;
   string Access;

   // This is the subprocess IPC setup
   pid_t Process;
   int InFd;
   int OutFd;
   bool InReady;
   bool OutReady;
   
   // Various internal things
   bool Debug;
   vector<string> MessageQueue;
   string OutQueue;
   
   // Private constructor helper
   void Construct();
   
   // Message handling things
   bool ReadMessages();
   bool RunMessages();
   bool InFdReady();
   bool OutFdReady();
   
   // The message handlers
   bool Capabilities(string Message);
   bool SendConfiguration();
   bool MediaChange(string Message);
   
   bool MethodFailure();
   void ItemDone();
   
   public:
   
   // The curent method state
   pkgAcquire::Queue::QItem *CurrentItem;
   string Status;
   unsigned long CurrentSize;
   unsigned long TotalSize;
   unsigned long ResumePoint;
   
   // Load the method and do the startup 
   bool QueueItem(pkgAcquire::Queue::QItem *Item);
   bool Start();
   void Pulse();
   inline const MethodConfig *GetConf() const {return Config;};
   
   Worker(Queue *OwnerQ,MethodConfig *Config,pkgAcquireStatus *Log);
   Worker(MethodConfig *Config);
   ~Worker();
};

#endif




See more files for this project here

GreenSocs

To develop SystemC infrustructure, basic IP, patches and add on library code for eventual standerdization.\r\nThe GreenSocs project is made up of a number of contributions (sub projects). Please visit www.greensocs.com for more information.

Project homepage: http://sourceforge.net/projects/greensocs
Programming language(s): C,C++,Java,Perl,XML
License: other

  contrib/
    cdromutl.cc
    cdromutl.h
    cmndline.cc
    cmndline.h
    configuration.cc
    configuration.h
    crc-16.cc
    crc-16.h
    error.cc
    error.h
    fileutl.cc
    fileutl.h
    hashes.cc
    hashes.h
    md5.cc
    md5.h
    mmap.cc
    mmap.h
    progress.cc
    progress.h
    sha1.cc
    sha1.h
    sptr.h
    strutl.cc
    strutl.h
    system.h
  deb/
    debindexfile.cc
    debindexfile.h
    deblistparser.cc
    deblistparser.h
    debrecords.cc
    debrecords.h
    debsrcrecords.cc
    debsrcrecords.h
    debsystem.cc
    debsystem.h
    debversion.cc
    debversion.h
    dpkgpm.cc
    dpkgpm.h
  acquire-item.cc
  acquire-item.h
  acquire-method.cc
  acquire-method.h
  acquire-worker.cc
  acquire-worker.h
  acquire.cc
  acquire.h
  algorithms.cc
  algorithms.h
  cachefile.cc
  cachefile.h
  cacheiterators.h
  clean.cc
  clean.h
  depcache.cc
  depcache.h
  indexfile.cc
  indexfile.h
  init.cc
  init.h
  makefile
  orderlist.cc
  orderlist.h
  packagemanager.cc
  packagemanager.h
  pkgcache.cc
  pkgcache.h
  pkgcachegen.cc
  pkgcachegen.h
  pkgrecords.cc
  pkgrecords.h
  pkgsystem.cc
  pkgsystem.h
  policy.cc
  policy.h
  sourcelist.cc
  sourcelist.h
  srcrecords.cc
  srcrecords.h
  tagfile.cc
  tagfile.h
  version.cc
  version.h
  versionmatch.cc
  versionmatch.h