/*
 * main.h
 * 
 * Copyright (C) 2006  Josef Kufner <jk@myserver.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.
 *
 */
#ifndef JK_MAIN_H
#define JK_MAIN_H

#include <loudmouth/loudmouth.h>

/*
 * Debuging staff
 *
 */
#define PROG_NAME	"netboard-jabber"

#define print_msg(level, msg, arg...)					\
{									\
	if (level <= verbose)						\
		g_printerr(PROG_NAME ": " msg "\n", ##arg );		\
}                                                                                                                                                                         

/* verbose levels */
enum {
	D_ERR = 0, D_NORMAL, D_VERBOSE, D_DEBUG, D__MAX
};
/* null terminated array of verbose level names */
extern gchar *verbose_level_str[D__MAX + 1];

/* global variables */
extern gint verbose;

extern gchar *j_server;
extern gint j_port;
extern gchar *j_username;
extern gchar *j_nick;
extern gchar *j_password;
extern gchar *j_resource;
extern gchar *j_room;
extern gchar *j_room_passwd;
extern gchar *j_fingerprint;
extern gchar *j_room_complete, *j_from_complete;
extern gint verbose_flag;

gchar start_time[32];

#endif

