1e254a845SShuo Chen// excerpts from http://code.google.com/p/muduo/
2e254a845SShuo Chen//
3e254a845SShuo Chen// Use of this source code is governed by a BSD-style license
4e254a845SShuo Chen// that can be found in the License file.
5e254a845SShuo Chen//
6e254a845SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com)
7e254a845SShuo Chen
8e254a845SShuo Chen#ifndef MUDUO_NET_CALLBACKS_H
9e254a845SShuo Chen#define MUDUO_NET_CALLBACKS_H
10e254a845SShuo Chen
11e254a845SShuo Chen#include <boost/function.hpp>
12e254a845SShuo Chen#include <boost/shared_ptr.hpp>
13e254a845SShuo Chen
14e254a845SShuo Chen#include "datetime/Timestamp.h"
15e254a845SShuo Chen
16e254a845SShuo Chennamespace muduo
17e254a845SShuo Chen{
18e254a845SShuo Chen
19e254a845SShuo Chen// All client visible callbacks go here.
20e254a845SShuo Chen
21e254a845SShuo Chenclass Buffer;
22e254a845SShuo Chenclass TcpConnection;
23e254a845SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
24e254a845SShuo Chen
25e254a845SShuo Chentypedef boost::function<void()> TimerCallback;
26e254a845SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback;
27e254a845SShuo Chentypedef boost::function<void (const TcpConnectionPtr&,
28e254a845SShuo Chen                              Buffer* buf,
29e254a845SShuo Chen                              Timestamp)> MessageCallback;
30e254a845SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> WriteCompleteCallback;
31e254a845SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback;
32e254a845SShuo Chen
33e254a845SShuo Chen}
34e254a845SShuo Chen
35e254a845SShuo Chen#endif  // MUDUO_NET_CALLBACKS_H
36