<?php
/*
 * $RCSfile: CustomFieldInterface_1_0.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.4 $ $Date: 2005/08/23 03:49:37 $
 * @package CustomField
 * @author Alan Harder <alan.harder@sun.com>
 */

/**
 * This is an interface for the custom field module.  Modules that wish to create
 * custom fields or set field values can utilize an implementation of this interface.
 *
 * @package CustomField
 * @subpackage Classes
 */
class CustomFieldInterface_1_0 {

    /**
     * Create new custom fields
     *
     * @param array of string field names
     * @param int id of container; for album-specific settings
     * @return array(object GalleryStatus a status code,
     *               array(string duplicate field names))
     */
    function createCustomFields($fieldNames, $containerId=0) {
	return array(GalleryStatus::error(ERROR_UNIMPLEMENTED, __FILE__, __LINE__),
		     null);
    }

    /**
     * Set custom field values for an item; overwrites all existing field values.
     *
     * @param int item id
     * @param array(field=>value, ..) field values
     * @return object GalleryStatus a status code
     */
    function setCustomFieldValues($itemId, $data) {
	return GalleryStatus::error(ERROR_UNIMPLEMENTED, __FILE__, __LINE__);
    }
}
?>
