// Copyright 1998 The Open Group Research Institute.  All rights reserved.
// Copyright 1999 Memesoft.  All rights reserved.

package krb5.lib.ccache;

import krb5.lib.*;
import java.io.*;

/**
 * File credential cache implementation
 */
public class FileCCacheImpl extends CCacheImpl implements CredentialsCache {

	/**
	 * Name
	 */
    PrincipalName thisPrincipal_;

    // MUST BE PUBLIC or the getConstructor() method used by the
    // CCacheFactory to obtain a handle on the constructor at runtime
    // will fail.
	/**
	 * Class constructor
	 *
	 * @param info is of type String
	 */
    public FileCCacheImpl(String info) {
	    // XXX To be Implemented
    }

	/**
	 * Returns name
	 *
	 * @return String is a result
	 */
	public synchronized String getName() {
	    //XXX To be Implemented
	    return null;
	}

	/**
	 * Returns name
	 *
	 * @return PrincipalName is a result
	 * @see krb5.lib.PrincipalName
	 */
	public synchronized PrincipalName getPrimaryPrincipal() {
	    return (PrincipalName)thisPrincipal_.clone();
	}

	/**
	 * Sets name
	 *
	 * @param princ is of type PrincipalName
	 * @see krb5.lib.PrincipalName
	 */
	public synchronized void setPrimaryPrincipal(PrincipalName princ) {
	    thisPrincipal_ = (PrincipalName)princ.clone();
	}

	/**
	 * Destroy
	 */
	public synchronized void destroy() {
	}

	/**
	 * Finalize
	 */
	public void finalize() {
	    destroy();
	}

	/**
	 * Add credentials
	 *
	 * @param cred is of type Credentials
	 * @see krb5.lib.ccache.Credentials
	 */
	public synchronized void add(Credentials cred) {
	    //XXX TO BE IMPLEMENTED
	}

	/**
	 * Add credentials
	 *
	 * @param creds is of type Credentials[]
	 * @see krb5.lib.ccache.Credentials
	 */
	public synchronized void add(Credentials[] creds) {
	    //XXX TO BE IMPLEMENTED
	}

	/**
	 * Removes credentials
	 *
	 * @param creds is of type Credentials
	 * @see krb5.lib.ccache.Credentials
	 */
	public synchronized void remove(Credentials creds) {
	}

	/**
	 * Removes credentials
	 *
	 * @param creds is of type Credentials[]
	 * @see krb5.lib.ccache.Credentials
	 */
	public synchronized void remove(Credentials[] creds) {
	}

	/**
	 * Returns credentials
	 *
	 * @return CCacheEnumerator is a result
	 * @see krb5.lib.ccache.CCacheEnumerator
	 */
	public synchronized CCacheEnumerator getCredentials() {
	    //XXX TO BE IMPLEMENTED
	    return null;
	}

	/**
	 * Lookups for a credentials
	 *
	 * @return CCacheEnumerator is a result
	 * @param filters is of type CredentialsFilter[]
	 * @see krb5.lib.ccache.CCacheEnumerator
	 * @see krb5.lib.ccache.CredentialsFilter
	 */
	public synchronized CCacheEnumerator lookupCredentials(CredentialsFilter[] filters) {
	    //XXX TO BE IMPLEMENTED
		return null;
    }

	/**
	 * Lookups for a single credentials
	 *
	 * @return Credentials is a result
	 * @param filters is of type CredentialsFilter[]
	 * @see krb5.lib.ccache.Credentials
	 * @see krb5.lib.ccache.CredentialsFilter
	 */
	public synchronized Credentials lookupSingleCredentials(CredentialsFilter[] filters) {
	    //XXX TO BE IMPLEMENTED
	    return null;
	}

	/**
	 * Copies from a given credentials cache
	 *
	 * @param ccache is of type CredentialsCache
	 * @see krb5.lib.ccache.CredentialsCache
	 */
	public synchronized void copyFrom(CredentialsCache ccache) {
	    //XXX TO BE IMPLEMENTED
	}

	/**
	 * Prints
	 */
	public synchronized void print() {
	    //XXX TO BE IMPLEMENTED
	}
}