summaryrefslogtreecommitdiff
path: root/examples/APG/Timers/PCB.h
blob: 7fdb9d2d1cf9721a2ebf5ec389b8a6c1b3dfb038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* -*- C++ -*- */
// $Id$

#if !defined(PCB_H)
#define PCB_H

// Listing 1 code/ch20
class PCB
{
public:
  PCB ();
  virtual ~PCB ();

  // Set/get the timer id that is being handled by this instance.
  void setID (long timerID);
  long getID (void) const;

  // Handle a timeout event, cancel, and close.
  virtual int handleEvent (const void *arg);
  virtual int handleCancel (void);
  virtual int handleClose (void);
 
private:
  long timerID_;
  int count_;
};
// Listing 1

#endif /*PCB_H*/