140161064SShuo Chen// excerpts from http://code.google.com/p/muduo/
240161064SShuo Chen//
340161064SShuo Chen// Use of this source code is governed by a BSD-style license
440161064SShuo Chen// that can be found in the License file.
540161064SShuo Chen//
640161064SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com)
740161064SShuo Chen
840161064SShuo Chen#ifndef MUDUO_NET_CALLBACKS_H
940161064SShuo Chen#define MUDUO_NET_CALLBACKS_H
1040161064SShuo Chen
1140161064SShuo Chen#include <boost/function.hpp>
1240161064SShuo Chen#include <boost/shared_ptr.hpp>
1340161064SShuo Chen
1440161064SShuo Chen#include "datetime/Timestamp.h"
1540161064SShuo Chen
1640161064SShuo Chennamespace muduo
1740161064SShuo Chen{
1840161064SShuo Chen
1940161064SShuo Chen// All client visible callbacks go here.
2040161064SShuo Chen
2140161064SShuo Chenclass Buffer;
2240161064SShuo Chenclass TcpConnection;
2340161064SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
2440161064SShuo Chen
2540161064SShuo Chentypedef boost::function<void()> TimerCallback;
2640161064SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback;
2740161064SShuo Chentypedef boost::function<void (const TcpConnectionPtr&,
2840161064SShuo Chen                              Buffer* buf,
2940161064SShuo Chen                              Timestamp)> MessageCallback;
3040161064SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> WriteCompleteCallback;
3140161064SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback;
3240161064SShuo Chen
3340161064SShuo Chen}
3440161064SShuo Chen
3540161064SShuo Chen#endif  // MUDUO_NET_CALLBACKS_H
36