#ifndef EPP_HOST_IDL
#define EPP_HOST_IDL

#include "epp.idl"

/*
** EPP-RTK IDL
**
** Authors: 
**      Daniel Manley (Tucows Inc)
**      Asbjorn Steira Mikkelsen (The Global Name Registry, Limited)
**      Frank Thompson (Tucows Inc)
**
** $Header: /cvsroot/epp-rtk/epp-rtk/idl/0705/epp_host.idl,v 1.1 2003/03/21 16:04:57 tubadanm Exp $
** $Revision: 1.1 $
** $Date: 2003/03/21 16:04:57 $
*/

module host
{
    ///////////////////////////
    //  common enumerations  //
    ///////////////////////////
    enum epp_HostStatusType
    { 
        CLIENT_DELETE_PROHIBITED,
        CLIENT_UPDATE_PROHIBITED,
        LINKED,
        OK,
        PENDING_CREATE,
        PENDING_DELETE,
        PENDING_TRANSFER,
        PENDING_UPDATE,
        SERVER_DELETE_PROHIBITED,
        SERVER_UPDATE_PROHIBITED
    };

    struct epp_HostStatus
    {
        epp_HostStatusType m_type;
        epp::epp_string m_lang;
        epp::epp_string m_value;
    };
    
    typedef sequence<epp_HostStatus> epp_host_status_seq;

    enum epp_HostAddressType
    {
        IPV4,
        IPV6
    };

    struct epp_HostAddress
    {
        epp_HostAddressType m_type;
        epp::epp_string m_ip;
    };

    typedef sequence<epp_HostAddress> epp_host_address_seq;

    /////////////////
    //  host:info  //
    /////////////////
    struct epp_HostInfoReq
    {
        epp::epp_Command m_cmd;
        epp::epp_string m_name;
    };

    struct epp_HostInfoRsp
    {
        epp::epp_Response m_rsp;
        epp::epp_string m_name;
        epp::epp_roid m_roid;
        epp_host_status_seq m_status;
        epp_host_address_seq m_addresses;
        epp::epp_string m_client_id;
        epp::epp_string m_created_by;
        epp::epp_datetime m_created_date;
        epp::epp_string m_updated_by;
        epp::epp_datetime m_updated_date;
        epp::epp_datetime m_transfer_date;
    };

    interface epp_HostInfo : epp::epp_Action
    {
        void setRequestData(in epp_HostInfoReq parms);
        epp_HostInfoRsp getResponseData();
    };

    //////////////////
    //  host:check  //
    //////////////////
    struct epp_HostCheckReq
    {
        epp::epp_Command m_cmd;
        epp::epp_string_seq m_names;
    };

    struct epp_HostCheckRsp
    {
        epp::epp_Response m_rsp;
        epp::epp_check_result_seq m_results;
    };

    interface epp_HostCheck : epp::epp_Action
    {
        void setRequestData(in epp_HostCheckReq parms);
        epp_HostCheckRsp getResponseData();
    };

    ///////////////////
    //  host:create  //
    ///////////////////
    struct epp_HostCreateReq
    {
        epp::epp_Command m_cmd;
        epp::epp_string m_name;
        epp_host_address_seq m_addresses;
    };

    struct epp_HostCreateRsp
    {
        epp::epp_Response m_rsp;
        epp::epp_string m_name;
        epp::epp_datetime m_creation_date;
    };

    interface epp_HostCreate : epp::epp_Action
    {
        void setRequestData(in epp_HostCreateReq parms);
        epp_HostCreateRsp getResponseData();
    };

    ///////////////////
    //  host:delete  //
    ///////////////////
    struct epp_HostDeleteReq
    {
        epp::epp_Command m_cmd;
        epp::epp_string m_name;
    };

    struct epp_HostDeleteRsp
    {
        epp::epp_Response m_rsp;
    };

    interface epp_HostDelete : epp::epp_Action
    {
        void setRequestData(in epp_HostDeleteReq parms);
        epp_HostDeleteRsp getResponseData();
    };

    ///////////////////
    //  host:update  //
    ///////////////////
    struct epp_HostUpdateAddRemove
    {
        epp_host_address_seq m_addresses;
        epp_host_status_seq m_status;
    };

    struct epp_HostUpdateChange
    {
        epp::epp_string m_name;
    };

    struct epp_HostUpdateReq
    {
        epp::epp_Command m_cmd;
        epp::epp_string m_name;
        epp_HostUpdateAddRemove m_add;
        epp_HostUpdateAddRemove m_remove;
        epp_HostUpdateChange m_change;
    };

    struct epp_HostUpdateRsp
    {
        epp::epp_Response m_rsp;
    };

    interface epp_HostUpdate : epp::epp_Action
    {
        void setRequestData(in epp_HostUpdateReq parms);
        epp_HostUpdateRsp getResponseData();
    };

    //
    // This is the Pending Action Notification response
    // data struct, present in poll responses.
    //
    interface epp_HostPanData : epp::epp_PollResData
    {
        // The value of this const is to be returned in
        // the call to getType() defined in epp_PollResData
        const epp::epp_string m_type = "host:panData";
        
        attribute epp::epp_string m_name;
        attribute epp::epp_boolean m_result;
        attribute epp::epp_TransID m_trid;
        attribute epp::epp_datetime m_date;
    }; 

};

#endif
