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