/*
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 __MAIN_H__
#define __MAIN_H__


#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <errno.h>

#if ((defined _WIN32) || (defined __WIN32__))
#include "scol_plugin_win.h"
#elif ((defined linux) || (defined __linux))
#include "scol_plugin_lin.h"
#else
#error no platform supported
#endif

#include "macros.h"
#include "md5.h"
/*#include "lib_string.h"*/

struct scolPathPartition
{
    char *admin;
    char *user;
    char *cache;
    char *log;
};
typedef struct scolPathPartition *scolPathPartition;
scolPathPartition spPartition;


/* APIs */
int SCOLinitTEMPFILEclass (mmachine m);
int SCOLinitSTANDARDLIBRARYclass (mmachine m);
int SCOLinitSTRINGTABclass (mmachine m);
/*int SCOLinitCURLclass (mmachine m);*/
int SCOLinitBENCHMARKclass (mmachine m);



/* Init */
char * lib_sys_getDatasFromUsm (char *data, size_t lenmax, char* (*f) (char *a[SIZESIGN], int n, char *d, size_t l));
char * lib_sys_getPathPartition (char *argv [SIZESIGN], int n, char *partition, size_t lenmax);
char * lib_sys_getPathAdminPartition (char *argv [SIZESIGN], int n, char *partition, size_t lenmax);



#if ((defined _WIN32) || (defined __WIN32__))
#define SEP '\\'
#elif ((defined linux) || (defined __linux))
#define SEP '/'
#else
#define SEP '/'
#endif

#endif /* __MAIN_H__ */





