Atlas  0.7.0
Networking protocol for the Worldforge system.
Negotiate.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU Lesser General Public License (See COPYING for details).
3 // Copyright (C) 2000 Michael Day
4 
5 // $Id$
6 
7 #ifndef ATLAS_NEGOTIATE_H
8 #define ATLAS_NEGOTIATE_H
9 
10 #include <memory>
11 
12 namespace Atlas {
13 
14 class Bridge;
15 class Codec;
16 
28 class Negotiate
29 {
30  public:
31  virtual ~Negotiate() = default;
32 
33  enum State
34  {
35  IN_PROGRESS,
36  SUCCEEDED,
37  FAILED
38  };
39 
40  virtual State getState() = 0;
41  virtual std::unique_ptr<Codec> getCodec(Bridge &) = 0;
42  virtual void poll() = 0;
43 };
44 
45 } // Atlas namespace
46 
47 #endif
Atlas::Negotiate
Definition: Negotiate.h:29
Atlas::Bridge
Definition: Bridge.h:36
Atlas
Definition: Bridge.h:20