import { OS } from "./lib/os/index.js"
import { Empty } from 'google-protobuf/google/protobuf/empty_pb'

export class os_api {
  constructor(dial) {
    this.M = new OS(dial)
  }

  async Hostname() {
    let c = await this.M.Hostname(new Empty)
    return c.getC()
  }

  async Homedir() {
    let c = await this.M.Homedir(new Empty)
    return c.getC()
  }
}

let local = new os_api()


/**
 * @name Hostname
 * @function
 */
export const Hostname = local.Hostname.bind(local);


/**
 * @name Homedir
 * @function
 */
export const Homedir = local.Homedir.bind(local);
