OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_ | |
6 #define BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_ | |
7 | |
8 namespace blimp { | |
9 | |
10 class BlimpMessage; | |
11 | |
12 // Abstract interface for classes that can receive BlimpMessages. | |
Wez
2015/10/09 23:15:34
nit: I can see it's abstract; suggest just "Interf
Kevin M
2015/10/10 00:42:34
Done.
| |
13 class BlimpMessageReceiver { | |
14 public: | |
15 virtual ~BlimpMessageReceiver() {} | |
16 | |
17 // Receives |message| for processing. | |
18 // The handler is responsible for routing the call through the appropriate | |
19 // thread. | |
20 // Method will return false if |message| is invalid, which should cause the | |
21 // connection to be terminated. | |
Wez
2015/10/09 23:15:35
nit: Make clear that the caller needs to terminate
Kevin M
2015/10/10 00:42:34
Done.
| |
22 virtual bool OnMessage(const BlimpMessage& message) = 0; | |
Wez
2015/10/09 23:15:34
nit: OnBlimpMessage, for consistency, and 'cos OnM
Kevin M
2015/10/10 00:42:34
Done.
| |
23 }; | |
24 | |
25 } // namespace blimp | |
26 | |
27 #endif // BLIMP_NET_BLIMP_MESSAGE_RECEIVER_H_ | |
OLD | NEW |