/**
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 *
 * The iWear Framework 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 as in version 2 of the License.

 * 
 * The iWear Framework 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
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __IWREMOTE_REMOTECALLER_H
#define __IWREMOTE_REMOTECALLER_H

namespace iwear
{
    namespace net
    {
/** 
 * what reasons do we have why a call has come through ?
 * @note the Trust whitelistings can be configured to a "trust all hosts/ssl
 * keys which host/ssl key xyz does trust too. Here we do not distinguish
 * between IPv4 and IPv6 adresses yet.
 * @warning Always be aware that a host we trust due to 3rd party trust might
 * be trusted by them due to 3rd party trust too.
 * XXX sync with security providers knowledge
 */
enum pass_reason
{
    r_nolist,	///< Passed through because it wasnt in any black or whitelist
    r_whitelist_ssl, ///< Passed through because SSL Key was whitelisted
    r_whitelist_host4, ///< Passed through because IPv4 Host Adress was whitelisted
    r_whitelist_host6, ///< Passed through because IPv6 Host Adress was whitelisted
    r_whitelist_trust_ssl_host, ///< Passed through because we trust a certain
    				///  SSL key which has told us to trust a certain host
    r_whitelist_trust_host_ssl, ///< Passed through because we trust a certain host, which trusts a certain ss key
    r_whitelist_trust_host_host,///< see the others
    r_whitelist_trust_ssl_ssl, ///< see the others
    num_pass_reason
};
/**
 * This Class is a description of the Object that called us. It stores some
 * information about it.
 */
class RemoteCaller
{
private:
protected:
public:
    /**
     * This is the RemoteConnection that is used to communicate with the
     * object.
     * It Contains connection info about the host, as well as the possible ssl
     * key or the host adress if ipv4/6 connection.
     * @note this is non-cons to allow it to be used for some stuff like
     * getting rpcstreams
     */
    RemoteConnection* rmc;

    /**
     * The reason why this call has passed the delivery system and has reached
     * the object now.
     * @todo BIG FAT TODO we need to set this from within the security providers
     */
    pass_reason prsn;


};

}
}

#endif
