contract DTHPoolInterface {

    // delegae url
    string public delegateUrl;

    // Max time the tokens can be blocked.
    // The real voting in the DAO will be called in the last moment in order
    // to block the tokens for the minimum time. This parameter defines the
    // seconds before the voting period ends that the vote can be performed
    uint maxTimeBlocked;


    // Address of the delegate
    address public delegate;

    // The DAO contract
    address public daoAddress;

    struct ProposalStatus {

        // True when the delegate sets the vote
        bool voteSet;

        // True if the proposal should ve voted
        bool willVote;

        // True if the proposal should be accepted.
        bool suportProposal;

        // True when the vote is performed;
        bool executed;

        // Proposal votingDeadline
        uint votingDeadline;

        // String set by the delegator with the motivation
        string motivation;
    }

    // Statuses of the diferent proposal
    mapping (uint => ProposalStatus) public proposalStatuses;


    // Index of proposals by oraclizeId
    mapping (bytes32 => uint) public oraclizeId2proposalId;

    /// @dev Constructor setting the dao address and the delegate
    /// @param _daoAddress address of the DAO
    /// @param _delegate adddress of the delegate.
    /// @param _maxTimeBlocked the maximum time the tokens will be blocked
    /// @param _delegateName Name of the delegate
    /// @param _delegateUrl Url of the delegate
    /// @param _tokenSymbol token  symbol.
    // DTHPool(address _daoAddress, address _delegate, uint _maxTimeBlocked, string _delegateName, string _delegateUrl, string _tokenSymbol);


    /// @notice send votes to this contract.
    /// @param _amount Tokens that will be transfered to the pool.
    /// @return Whether the transfer was successful or not
    function delegateDAOTokens(uint _amount) returns (bool _success);

    /// Returns DAO tokens to the original
    /// @param _amount that will be transfered back to the owner.
    /// @return Whether the transfer was successful or not
    function undelegateDAOTokens(uint _amount) returns (bool _success);


    /// @notice This method will be called by the delegate to publish what will
    /// be his vote in a specific proposal.
    /// @param _proposalID The proposal to set the vote.
    /// @param _willVote true If the proposal will be voted.
    /// @param _supportsProposal What will be the vote.
    function setVoteIntention(
        uint _proposalID,
        bool _willVote,
        bool _supportsProposal,
        string _motivation
    ) returns (bool _success);

    /// @notice This method will be doing the actual voting in the DAO
    /// for the _proposalID
    /// @param _proposalID The proposal to set the vote.
    /// @return _finalized true if this vote Proposal must not be executed again.
    function executeVote(uint _proposalID) returns (bool _finalized);


    /// @notice This function is intended because if some body sends tokens
    /// directly to this contract, the tokens can be sent to the delegate
    function fixTokens() returns (bool _success);


    /// @notice If some body sends ether to this contract, the delegate will be
    /// able to extract it.
    function getEther() returns (uint _amount);

    /// @notice Called when some body delegates token to the pool
    event Delegate(address indexed _from, uint256 _amount);

    /// @notice Called when some body undelegates token to the pool
    event Undelegate(address indexed _from, uint256 _amount);

    /// @notice Called when the delegate set se vote intention
    event VoteIntentionSet(uint indexed _proposalID, bool _willVote, bool _supportsProposal);

    /// @notice Called when the vote is executed in the DAO
    event VoteExecuted(uint indexed _proposalID);

}
////////////////////
function setVoteIntention(
    uint _proposalID,
    bool _willVote,
    bool _supportsProposal,
    string _motivation
) returns (bool _success);

/// @notice This method will be called by the delegate to publish what will
/// be his vote in a specific proposal.
/// @param _proposalID The proposal to set the vote.
/// @param _willVote true If the proposal will be voted.
/// @param _supportsProposal What will be the vote.