/*
This source file is part of Scol
For the latest info, see http://www.scolring.org

Copyright (c) 2010 Stephane Bisaro, aka Iri <iri@irizone.net>

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser 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, or go to
http://www.gnu.org/copyleft/lesser.txt

For others informations, please contact us from http://www.scolring.org/
*/


#ifndef __SCOL_GLIB_MISC_H__
#define __SCOL_GLIB_MISC_H__

#include <glib.h>


gboolean scol_glib_isabsolutepath (const gchar * p); /* return TRUE if a path is an absolute path */

/* The result of these functions should NOT be freed ! */
const gchar * scol_glib_name_scolexe (); /* return the name of the executable (must not be modified or freed) */
const gchar * scol_glib_get_env (const gchar *v); /* return the value of an environment variable */
const gchar * scol_glib_get_hostname (); /* return the host name  (must not be modified or freed) */
const gchar * scol_glib_get_username (); /* return the name of the current user */

/* The result of these functions should be freed when it is no longer needed ! */
gchar * scol_glib_filename_scol ();      /* return the absolute path of the current Scol. Use g_free */
gchar * scol_glib_dirname_scol ();       /* return the absolute path of the directory of Scol. Use g_free */
gchar * scol_glib_basename (const gchar *f); /* return the basename (the file) of any path. Use g_free */
char * scol_glib_get_sizefordisplay (int v);    /* return a comprehensive size string. Use g_free */

#endif  /* __SCOL_GLIB_MISC_H__ */
