/*
 * front/iface.h
 *   Frontend's common interface to core
 *
 * $Id: iface.h,v 1.1.1.1 2002/01/24 20:19:48 sembera Exp $
 */
/*
 * IIRC - IIRC Is a Real Client (Modular IRC Client)
 * Copyright (C) 2001  Jan Sembera <fis@ji.cz>
 * Copyright (C) 2001  Petr Baudis <pasky@ji.cz>
 *
 * This program 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; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __IIRC_FRONT_IF
#define __IIRC_FRONT_IF

#include"dummy.h"

/* send raw string to a display */
#define	CMD_FRONT_RAW		0

typedef struct {
  char *string;
} cmd_front_raw_t;


/* connect to a server */
#define	CMD_FRONT_CONNECT_PRE	1

#define	CMD_FRONT_CONNECT_POST	2

typedef struct {
  char *server;
} cmd_front_connect_t;


/* disconnect from a server */
#define	CMD_FRONT_DISCONNECT_PRE	3

#define	CMD_FRONT_DISCONNECT_POST	4

typedef struct {
  char dummy;
} cmd_front_disconnect_t;


/* some error */
#define	CMD_FRONT_ERROR		5

typedef struct {
  int code;
  char *file;
  int line;
  int err_no;
  int origin;
} cmd_front_error_t;


/* quit */
#define	CMD_FRONT_QUIT		6

typedef struct {
  char *nick; /* core->front only */
  char *reason;
} cmd_front_quit_t;


/* privmsg */
#define	CMD_FRONT_PRIVMSG	7

typedef struct {
  char *origin; /* core->front only */
  char *target;
  char *string;
} cmd_front_privmsg_t;


/* nick */
#define	CMD_FRONT_NICK		8

typedef struct {
  char *nick;
  char *orignick; /* core->front only */
} cmd_front_nick_t;


/* join */
#define	CMD_FRONT_JOIN		9

typedef struct {
  char *origin; /* core->front only */
  char *channel;
} cmd_front_join_t;


/* part */
#define	CMD_FRONT_PART		10

typedef struct {
  char *origin; /* core->front only */
  char *channel;
  char *reason;
} cmd_front_part_t;


#endif
