import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { RPCService } from '@loafer/ng-rpc/service';
import {
  DiscoveryStartInfo,
  DiscoverZone as MDDiscoverZone,
  DiscoverHost as MDDiscoverHost,
  DiscoverPort as MDDiscoverPort,
  DiscoverService as MDDiscoverService,
  Zone,
  Host,
  Port,
  Service,
} from '@overflow/commons-typescript/model/discovery';
import { Probe } from '@overflow/commons-typescript/model/probe';

@Injectable()
export class TargetDiscoveryService {

  public constructor(
    private rpcService: RPCService,
  ) {

  }

  public saveAllTarget(hosts: Host[], probe: Probe): Observable<Boolean> {

    return this.rpcService.call('TargetDiscoveryService.saveAllTarget', hosts, probe);
  }

}
