shill: cellular: Move cellular code to its own sub-directory.
This CL is part of a series of CLs, which aim to reorganzie shill's flat
source code structure into a more modular form by moving technology
specific code into their own sub-directories.
BUG=chromium:433419
TEST=`USE='cellular' FEATURES=test emerge-$BOARD shill`
TEST=`USE='cellular clang asan' FEATURES=test emerge-$BOARD shill`
Change-Id: I783e85d8c606426ce2ded093588c1243fd0eef97
Reviewed-on: https://chromium-review.googlesource.com/229799
Reviewed-by: Thieu Le <thieule@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/cellular/mm1_bearer_proxy.h b/cellular/mm1_bearer_proxy.h
new file mode 100644
index 0000000..bdddf13
--- /dev/null
+++ b/cellular/mm1_bearer_proxy.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SHILL_CELLULAR_MM1_BEARER_PROXY_H_
+#define SHILL_CELLULAR_MM1_BEARER_PROXY_H_
+
+#include <string>
+
+#include "dbus_proxies/org.freedesktop.ModemManager1.Bearer.h"
+#include "shill/cellular/mm1_bearer_proxy_interface.h"
+#include "shill/dbus_properties.h"
+
+namespace shill {
+namespace mm1 {
+
+// A proxy to org.freedesktop.ModemManager1.Bearer.
+class BearerProxy : public BearerProxyInterface {
+ public:
+ // Constructs an org.freedesktop.ModemManager1.Bearer DBus object
+ // proxy at |path| owned by |service|.
+ BearerProxy(DBus::Connection *connection,
+ const std::string &path,
+ const std::string &service);
+
+ ~BearerProxy() override;
+
+ // Inherited methods from BearerProxyInterface
+ virtual void Connect(Error *error,
+ const ResultCallback &callback,
+ int timeout);
+ virtual void Disconnect(Error *error,
+ const ResultCallback &callback,
+ int timeout);
+
+ private:
+ class Proxy : public org::freedesktop::ModemManager1::Bearer_proxy,
+ public DBus::ObjectProxy {
+ public:
+ Proxy(DBus::Connection *connection,
+ const std::string &path,
+ const std::string &service);
+ ~Proxy() override;
+
+ private:
+ // Method callbacks inherited from
+ // org::freedesktop::ModemManager1::BearerProxy
+ virtual void ConnectCallback(const ::DBus::Error &dberror,
+ void *data);
+ virtual void DisconnectCallback(const ::DBus::Error &dberror,
+ void *data);
+
+ DISALLOW_COPY_AND_ASSIGN(Proxy);
+ };
+
+ Proxy proxy_;
+
+ DISALLOW_COPY_AND_ASSIGN(BearerProxy);
+};
+
+} // namespace mm1
+} // namespace shill
+
+#endif // SHILL_CELLULAR_MM1_BEARER_PROXY_H_