libzmq master
The Intelligent Transport Layer

i_engine.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright (c) 2009-2011 250bpm s.r.o.
00003     Copyright (c) 2007-2009 iMatix Corporation
00004     Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
00005 
00006     This file is part of 0MQ.
00007 
00008     0MQ is free software; you can redistribute it and/or modify it under
00009     the terms of the GNU Lesser General Public License as published by
00010     the Free Software Foundation; either version 3 of the License, or
00011     (at your option) any later version.
00012 
00013     0MQ is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public License
00019     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 #ifndef __ZMQ_I_ENGINE_HPP_INCLUDED__
00023 #define __ZMQ_I_ENGINE_HPP_INCLUDED__
00024 
00025 namespace zmq
00026 {
00027 
00028     //  Abstract interface to be implemented by various engines.
00029 
00030     struct i_engine
00031     {
00032         virtual ~i_engine () {}
00033 
00034         //  Plug the engine to the session.
00035         virtual void plug (class io_thread_t *io_thread_,
00036             class session_base_t *session_) = 0;
00037 
00038         //  Unplug the engine from the session.
00039         virtual void unplug () = 0;
00040 
00041         //  Terminate and deallocate the engine. Note that 'detached'
00042         //  events are not fired on termination.
00043         virtual void terminate () = 0;
00044 
00045         //  This method is called by the session to signalise that more
00046         //  messages can be written to the pipe.
00047         virtual void activate_in () = 0;
00048 
00049         //  This method is called by the session to signalise that there
00050         //  are messages to send available.
00051         virtual void activate_out () = 0;
00052     };
00053 
00054 }
00055 
00056 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines