<?php
/*
 * $RCSfile: GalleryValidationPlugin.class,v $
 *
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2005 Bharat Mediratta
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
 */
 
 /**
 * @version $Revision: 1.2 $ $Date: 2005/08/23 03:49:03 $
 * @package GalleryCore
 * @author Jay Rossiter <cryptographite@users.sf.net>
 */
 
 /**
 * This is an interface for security/validation plugins that will be used 
 * in multiple places across the codebase.  Most notably, UserLogin and the
 * register module.
 *
 * @package GalleryCore
 * @subpackage Classes
 */
class ValidationPlugin {
    /**
     * Perform any special actions on the login request before we actually
     * try to log in.
     *
     * @param array the form values
     * @return array object GalleryStatus a status code
     *               boolean true/false should we continue trying to log in?
     *               array of error keys
     */
    function performValidation(&$form) {
	return array(GalleryStatus::success(), true);
    }

    /**
     * @param object GalleryTemplate the template instance
     * @param array the form values
     * @param string ('HIGH', 'MEDIUM', 'LOW') The security level to apply to the plugin
     * @return array object GalleryStatus a status code
     *               string the path to a template file to include
     *               string localization domain for the template file
     */
    function loadTemplate(&$template, &$form, $securityLevel) {
	return array(GalleryStatus::success(), null);
    }
}
?>
