blob: d4f3332d5eaf0ef1e591f98392632510a64a9c24 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
#define REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
#include <string>
#include "base/basictypes.h"
namespace cricket {
class SessionManager;
} // namespace cricket
namespace remoting {
class IqRequest;
class SignalStrategy {
public:
class StatusObserver {
public:
enum State {
START,
CONNECTING,
CONNECTED,
CLOSED,
};
// Called when state of the connection is changed.
virtual void OnStateChange(State state) = 0;
virtual void OnJidChange(const std::string& full_jid) = 0;
};
SignalStrategy() {}
virtual ~SignalStrategy() {}
virtual void Init(StatusObserver* observer) = 0;
// TODO(sergeyu): Do these methods belong to this interface?
virtual void StartSession(cricket::SessionManager* session_manager) = 0;
virtual void EndSession() = 0;
virtual IqRequest* CreateIqRequest() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(SignalStrategy);
};
} // namespace remoting
#endif // REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
|