Skip to content
client.hh 1.24 KiB
Newer Older
/*
  This file is part of SLS.
  Copyright (C) 2008 Sebastien LUTTRINGER <contact@seblu.net>

  SLS is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; version 2 of the License.

  SLS is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with SLS; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef CLIENT_HH
# define CLIENT_HH

# include "connection.hh"

/*!
** Client Class
 */
class Client {
public:
  Client(Connection &c);
  virtual ~Client();

  virtual void exec();

  static Client *login(Connection &c);

protected:
  Connection c_;

private:
  static Client *login_fail(Connection &c);
};

/*!
** Client Daemon Class
 */
class Daemon: public Client {
public:
  Daemon(Connection &c);
  void exec();
};

/*!
** Client Console Class
 */
class Console : public Client {
public:
  Console(Connection &c);
  void exec();
};


#endif