1354280cfSShuo Chen// excerpts from http://code.google.com/p/muduo/
2354280cfSShuo Chen//
3354280cfSShuo Chen// Use of this source code is governed by a BSD-style license
4354280cfSShuo Chen// that can be found in the License file.
5354280cfSShuo Chen//
6354280cfSShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com)
7354280cfSShuo Chen
8354280cfSShuo Chen#ifndef MUDUO_NET_CALLBACKS_H
9354280cfSShuo Chen#define MUDUO_NET_CALLBACKS_H
10354280cfSShuo Chen
11354280cfSShuo Chen#include <boost/function.hpp>
12354280cfSShuo Chen#include <boost/shared_ptr.hpp>
13354280cfSShuo Chen
14354280cfSShuo Chen#include "datetime/Timestamp.h"
15354280cfSShuo Chen
16354280cfSShuo Chennamespace muduo
17354280cfSShuo Chen{
18354280cfSShuo Chen
19354280cfSShuo Chen// All client visible callbacks go here.
20354280cfSShuo Chen
21354280cfSShuo Chenclass Buffer;
22354280cfSShuo Chenclass TcpConnection;
23354280cfSShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
24354280cfSShuo Chen
25354280cfSShuo Chentypedef boost::function<void()> TimerCallback;
26354280cfSShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback;
27354280cfSShuo Chentypedef boost::function<void (const TcpConnectionPtr&,
28354280cfSShuo Chen                              Buffer* buf,
29354280cfSShuo Chen                              Timestamp)> MessageCallback;
30354280cfSShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> WriteCompleteCallback;
31354280cfSShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback;
32354280cfSShuo Chen
33354280cfSShuo Chen}
34354280cfSShuo Chen
35354280cfSShuo Chen#endif  // MUDUO_NET_CALLBACKS_H
36