from boinc_components.boinc_project import BoincProject
from boinc_components.boinc_project_gui_url import BoincProjectGuiUrl
from boinc_components.boinc_application import BoincApplication
from boinc_components.boinc_application_version import BoincApplicationVersion
from boinc_components.boinc_workunit import BoincWorkunit
from boinc_components.boinc_task import BoincTask
from boinc_components.boinc_time_stats import BoincTimeStats
from boinc_components.boinc_host import BoincHost

# TODO parse data from received output to host object
# Create subfunctions for each param of BoincHost except address and password
def parseOutputToHost(output, old_host):
    address = old_host.address
    password = old_host.password

    projects = []
    applications = []
    application_versions = []
    workunits = []
    tasks = []
    time_stats = parseOutputToBoincTimeStats(output)

    return BoincHost(address, password, projects, applications, application_versions, workunits, tasks, time_stats)

def parseOutputToBoincTimeStats(output):
    return BoincTimeStats()