blob: 1c2d93dd45230a26619314d1f3453dcba2667fa2 [file] [log] [blame]
Arman Uguray6e5639f2012-11-15 20:30:19 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_MM1_BEARER_PROXY_INTERFACE_H_
6#define SHILL_MM1_BEARER_PROXY_INTERFACE_H_
7
8#include <string>
9
10#include <base/basictypes.h>
11
12#include "shill/callbacks.h"
13
14namespace shill {
15
16class Error;
17
18namespace mm1 {
19
20// These are the methods that an org.freedesktop.ModemManager1.Bearer
21// proxy must support. The interface is provided so that it can be mocked
22// in tests. All calls are made asynchronously. Call completion is signalled
23// via callbacks passed to the methods.
24class BearerProxyInterface {
25 public:
26 virtual ~BearerProxyInterface() {}
27
28 virtual void Connect(Error *error,
29 const ResultCallback &callback,
30 int timeout) = 0;
31 virtual void Disconnect(Error *error,
32 const ResultCallback &callback,
33 int timeout) = 0;
34
35 // Properties
36 virtual const std::string Interface() = 0;
37 virtual bool Connected() = 0;
38 virtual bool Suspended() = 0;
39 virtual const DBusPropertiesMap Ip4Config() = 0;
40 virtual const DBusPropertiesMap Ip6Config() = 0;
41 virtual uint32_t IpTimeout() = 0;
42 virtual const DBusPropertiesMap Properties() = 0;
43};
44
45} // namespace mm1
46} // namespace shill
47
48#endif // SHILL_MM1_BEARER_PROXY_INTERFACE_H_