1<?php
2
3/**
4 *
5 * bareos-webui - Bareos Web-Frontend
6 *
7 * @link      https://github.com/bareos/bareos for the canonical source repository
8 * @copyright Copyright (c) 2014-2015 Bareos GmbH & Co. KG
9 * @license   GNU Affero General Public License (http://www.gnu.org/licenses/)
10 *
11 * This program is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Affero General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU Affero General Public License for more details.
20 *
21 * You should have received a copy of the GNU Affero General Public License
22 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 *
24 */
25
26namespace Bareos\BSock;
27
28interface BareosBSockInterface
29{
30   /**
31    * Authenticate
32    *
33    * @param $console
34    * @param $password
35    * @return boolean
36    */
37   public function connect_and_authenticate();
38
39   /**
40    * Set user credentials
41    *
42    * @param $username
43    * @param password
44    */
45   public function set_user_credentials($username, $password);
46
47   /**
48    * Set configuration
49    *
50    * @param $config
51    */
52   public function set_config($config);
53
54   /**
55    * Disconnect
56    *
57    * @return boolean
58    */
59   public function disconnect();
60
61   /**
62    * Send command
63    *
64    * @param $cmd
65    * @return string
66    */
67   public function send_command($cmd);
68
69}
70