#ifndef _MAIN_H #define _MAIN_H #include #include #include #include /* CGI Environment. The following HDF structure will be initialised by the * ClearSilver CGI kit to contain the GET and POST variables sent from the * browser. */ CGI* cgi; /* ClearSilver Template Engine. The following structure will be set up for * generating pages from templates. * * There's also a char* pointer, which contains the directory that stores the * template files. */ CSPARSE* cstemp; char* cstemp_dir; /* Default Photo settings */ #define DEFAULT_WIDTH 720 #define DEFAULT_HEIGHT 0 #define DEFAULT_QUALITY 60 #define DEFAULT_ROTATION "0.0" /* Max size */ #define MAX_WIDTH 2048 #define MAX_HEIGHT 2048 /* Entry point into entire webapp */ int main( int argc, char** argv ); /* Gallery listing page */ void gallery_index(); /* Gallery main handler */ void gallery_handler( struct gallery_info* gallery, /* Pointer to gallery information */ struct vararray* path_info /* PATH_INFO content */ ); /* Photo handler */ void photo_handler( struct gallery_info* gallery, struct vararray* path_info ); /* Action pages handler */ void action_handler( char* action_name, /* Name of action to perform */ struct vararray* path_info ); /* Write a template out */ void write_template( const char* template_name ); #endif