15af4b7fbSShuo Chen // excerpts from http://code.google.com/p/muduo/
25af4b7fbSShuo Chen //
35af4b7fbSShuo Chen // Use of this source code is governed by a BSD-style license
45af4b7fbSShuo Chen // that can be found in the License file.
55af4b7fbSShuo Chen //
65af4b7fbSShuo Chen // Author: Shuo Chen (chenshuo at chenshuo dot com)
75af4b7fbSShuo Chen 
85af4b7fbSShuo Chen #ifndef MUDUO_NET_CALLBACKS_H
95af4b7fbSShuo Chen #define MUDUO_NET_CALLBACKS_H
105af4b7fbSShuo Chen 
115af4b7fbSShuo Chen #include <boost/function.hpp>
125af4b7fbSShuo Chen #include <boost/shared_ptr.hpp>
135af4b7fbSShuo Chen 
145af4b7fbSShuo Chen #include "datetime/Timestamp.h"
155af4b7fbSShuo Chen 
165af4b7fbSShuo Chen namespace muduo
175af4b7fbSShuo Chen {
185af4b7fbSShuo Chen 
195af4b7fbSShuo Chen // All client visible callbacks go here.
205af4b7fbSShuo Chen 
215af4b7fbSShuo Chen class Buffer;
225af4b7fbSShuo Chen class TcpConnection;
235af4b7fbSShuo Chen typedef boost::shared_ptr<TcpConnection> TcpConnectionPtr;
245af4b7fbSShuo Chen 
255af4b7fbSShuo Chen typedef boost::function<void()> TimerCallback;
265af4b7fbSShuo Chen typedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback;
275af4b7fbSShuo Chen typedef boost::function<void (const TcpConnectionPtr&,
285af4b7fbSShuo Chen                               Buffer* buf,
295af4b7fbSShuo Chen                               Timestamp)> MessageCallback;
305af4b7fbSShuo Chen+typedef boost::function<void (const TcpConnectionPtr&)> WriteCompleteCallback;
315af4b7fbSShuo Chen typedef boost::function<void (const TcpConnectionPtr&)> CloseCallback;
325af4b7fbSShuo Chen 
335af4b7fbSShuo Chen }
345af4b7fbSShuo Chen 
355af4b7fbSShuo Chen #endif  // MUDUO_NET_CALLBACKS_H
36