13b467340SShuo Chen // excerpts from http://code.google.com/p/muduo/
23b467340SShuo Chen //
33b467340SShuo Chen // Use of this source code is governed by a BSD-style license
43b467340SShuo Chen // that can be found in the License file.
53b467340SShuo Chen //
63b467340SShuo Chen // Author: Shuo Chen (chenshuo at chenshuo dot com)
73b467340SShuo Chen 
83b467340SShuo Chen #ifndef MUDUO_NET_CALLBACKS_H
93b467340SShuo Chen #define MUDUO_NET_CALLBACKS_H
103b467340SShuo Chen 
113b467340SShuo Chen #include <boost/function.hpp>
123b467340SShuo Chen #include <boost/shared_ptr.hpp>
133b467340SShuo Chen 
143b467340SShuo Chen #include "datetime/Timestamp.h"
153b467340SShuo Chen 
163b467340SShuo Chen namespace muduo
173b467340SShuo Chen {
183b467340SShuo Chen 
193b467340SShuo Chen // All client visible callbacks go here.
203b467340SShuo Chen 
213b467340SShuo Chen+class Buffer;
223b467340SShuo Chen class TcpConnection;
233b467340SShuo Chen typedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
243b467340SShuo Chen 
253b467340SShuo Chen typedef boost::function<void()> TimerCallback;
263b467340SShuo Chen typedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback;
273b467340SShuo Chen typedef boost::function<void (const TcpConnectionPtr&,
283b467340SShuo Chen!                              Buffer* buf,
293b467340SShuo Chen!                              Timestamp)> MessageCallback;
303b467340SShuo Chen typedef boost::function<void (const TcpConnectionPtr&)> CloseCallback;
313b467340SShuo Chen 
323b467340SShuo Chen }
333b467340SShuo Chen 
343b467340SShuo Chen #endif  // MUDUO_NET_CALLBACKS_H
35