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

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <errno.h>
#include "md5.h"

#include "plugin.h"
#include "cbmachine.h"
#include "macros.h"
/*#include "lib_string.h"*/

/*extern cbmachine ww;*/
cbmachine ww;

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 SCOLinitUPDATEclass (mmachine m);
int SCOLinitBENCHMARKclass (mmachine m);



/* Init */
char * lib_sys_getDatasFromUsm (char *data, char *key, size_t lenmax, char * (*f) (char *a[SIZESIGN], char *key, int n, char *d, size_t l));
char * lib_sys_getPathPartition (char *argv [SIZESIGN], char *key, int n, char *partition, size_t lenmax);
char * lib_sys_getPathAdminPartition (char *argv [SIZESIGN], char *key, int n, char *partition, size_t lenmax);
char * lib_sys_getPluginsNames (char *argv [SIZESIGN], char *key, int n, char *libname, size_t lenmax);
void lib_sys_getListFromUsm (char libfiles[SIZESIGN][SIZESIGN], int *i, char *key);
char * lib_sys_getPathScol (char *pathscol);

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

#endif /* __SYSPACK_MAIN_H__ */











