package meerkat.voting.controller;

import meerkat.voting.encryptor.VBCryptoManager;
import meerkat.voting.gui.ui.VotingBoothUI;
import meerkat.voting.output.BallotOutputDevice;
import meerkat.voting.storage.StorageManager;

import java.io.IOException;


/**
 * An interface for the controller component of the voting booth
 */
public interface VotingBoothController extends Runnable {

    /**
     * initialize by setting all the different components of the Voting Booth to be recognized by this controller
     * @param outputDevice the ballot output device. Naturally a printer and/or ethernet connection
     * @param vbCrypto the crypto module
     * @param vbUI User interface in which the voter chooses his answers
     * @param vbStorageManager storage component for handling files and USB sticks
     */
    public void init (BallotOutputDevice outputDevice,
                      VBCryptoManager vbCrypto,
                      VotingBoothUI vbUI,
                      StorageManager vbStorageManager) throws IOException;

    /**
     * an asynchronous call from Admin Console (If there is such one implemented) to shut down the system
     */
    public void callShutDown();


}
