blob: 9ec59c33455b859f61b753670c70824dda4bd8fb [file] [log] [blame]
Jason Glasgowee1081c2012-03-06 15:14:53 -05001// 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_MODEM_SIMPLE_PROXY_INTERFACE_
6#define SHILL_MM1_MODEM_SIMPLE_PROXY_INTERFACE_
7
8#include <string>
9
10#include <base/basictypes.h>
11
Eric Shienbrood9a245532012-03-07 14:20:39 -050012#include "shill/callbacks.h"
Jason Glasgowee1081c2012-03-06 15:14:53 -050013
14namespace shill {
Jason Glasgowee1081c2012-03-06 15:14:53 -050015class Error;
16
17namespace mm1 {
18
19// These are the methods that a
20// org.freedesktop.ModemManager1.Modem.Simple proxy must support. The
21// interface is provided so that it can be mocked in tests. All calls
Eric Shienbrood9a245532012-03-07 14:20:39 -050022// are made asynchronously. Call completion is signalled via the callbacks
23// passed to the methods.
Jason Glasgowee1081c2012-03-06 15:14:53 -050024class ModemSimpleProxyInterface {
25 public:
26 virtual ~ModemSimpleProxyInterface() {}
27
Eric Shienbrood9a245532012-03-07 14:20:39 -050028 virtual void Connect(const DBusPropertiesMap &properties,
29 Error *error,
30 const DBusPathCallback &callback,
31 int timeout) = 0;
Jason Glasgowee1081c2012-03-06 15:14:53 -050032 virtual void Disconnect(const ::DBus::Path &bearer,
Eric Shienbrood9a245532012-03-07 14:20:39 -050033 Error *error,
34 const ResultCallback &callback,
Jason Glasgowee1081c2012-03-06 15:14:53 -050035 int timeout) = 0;
Eric Shienbrood9a245532012-03-07 14:20:39 -050036 virtual void GetStatus(Error *error,
37 const DBusPropertyMapCallback &callback,
Jason Glasgowee1081c2012-03-06 15:14:53 -050038 int timeout) = 0;
39};
40
Jason Glasgowee1081c2012-03-06 15:14:53 -050041} // namespace mm1
42} // namespace shill
43
44#endif // SHILL_MM1_MODEM_SIMPLE_PROXY_INTERFACE_