/builddir/build/BUILD/raul-0.4.0/raul/LashClient.hpp

00001 /* This file is part of Raul.
00002  * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
00003  * 
00004  * Raul is free software; you can redistribute it and/or modify it under the
00005  * terms of the GNU General Public License as published by the Free Software
00006  * Foundation; either version 2 of the License, or (at your option) any later
00007  * version.
00008  * 
00009  * Raul is distributed in the hope that it will be useful, but WITHOUT ANY
00010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for details.
00012  * 
00013  * You should have received a copy of the GNU General Public License along
00014  * with this program; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00016  */
00017 
00018 #ifndef RAUL_LASH_CLIENT_HPP
00019 #define RAUL_LASH_CLIENT_HPP
00020 
00021 #include <string>
00022 #include <boost/enable_shared_from_this.hpp>
00023 #include <lash/lash.h>
00024 #include <raul/SharedPtr.hpp>
00025 
00026 namespace Raul {
00027 
00028 
00029 class LashClient : public boost::enable_shared_from_this<LashClient> {
00030 public:
00031     virtual ~LashClient();
00032 
00033     static SharedPtr<LashClient> create(
00034             lash_args_t*       args,
00035             const std::string& name,
00036             int                flags);
00037     
00038     lash_client_t* lash_client() { return _lash_client; };
00039 
00040     bool enabled() { return lash_enabled(_lash_client); }
00041 
00042     void process_events();
00043 
00044 protected:
00045     LashClient(lash_client_t* client);
00046     
00047     virtual void handle_event(lash_event_t*)   {}
00048     virtual void handle_config(lash_config_t*) {}
00049     
00050     friend class LashProject;
00051     virtual void project_closed(const std::string& /*name*/) {}
00052     
00053     lash_client_t* _lash_client;
00054 };
00055 
00056 
00057 } // namespace Raul
00058 
00059 #endif // RAUL_LASH_CLIENT_HPP
00060 

Generated on Wed Apr 9 08:14:41 2008 for RAUL by  doxygen 1.5.1