summaryrefslogtreecommitdiffstats
path: root/blimp/net/blimp_message_processor.h
blob: d0609184f52b3b6d9b549ce6387daf705fbd946d (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
// Copyright 2015 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 BLIMP_NET_BLIMP_MESSAGE_PROCESSOR_H_
#define BLIMP_NET_BLIMP_MESSAGE_PROCESSOR_H_

#include "base/memory/scoped_ptr.h"
#include "net/base/completion_callback.h"

namespace blimp {

class BlimpMessage;

// Interface implemented by components that process BlimpMessages.
// Message processing workflows can be created as a filter chain of
// BlimpMessageProcessors, and test processors can be added to validate portions
// of the filter chain in isolation.
class BlimpMessageProcessor {
 public:
  virtual ~BlimpMessageProcessor() {}

  // Processes the BlimpMessage asynchronously.
  // The result of the operation is returned to the caller via |callback|.
  virtual void ProcessMessage(scoped_ptr<BlimpMessage> message,
                              const net::CompletionCallback& callback) = 0;
};

}  // namespace blimp

#endif  // BLIMP_NET_BLIMP_MESSAGE_PROCESSOR_H_