gallery/include/main.h

54 lines
1.3 KiB
C

#ifndef _MAIN_H
#define _MAIN_H
#include <galleries.h>
#include <varray.h>
#include <photo.h>
#include <ClearSilver.h>
#include <settings.h>
/* 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;
/* 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 );
/* Rotation Preview: Rotates the thumbnail of an image
* by the specified amount (in CGI parameters) and returns it. */
void action_rotation_preview( struct vararray* path_info );
/* Write a template out */
void write_template( const char* template_name );
#endif