shill: Start moving tehnology-specific functionality to capability delegates.

This basic patch demonstrates the intent to move CDMA/GSM-specific functionality
into capability delegates. This should reduce the conditional code in the
Cellular class and make it more readable and easier to maintain.

BUG=chromium-os:18735
TEST=unit tests

Change-Id: I80ee8682ff34810cf4a723119274450de4ae95a9
Reviewed-on: https://gerrit.chromium.org/gerrit/10775
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.h b/cellular.h
index 721f333..66eb306 100644
--- a/cellular.h
+++ b/cellular.h
@@ -22,6 +22,7 @@
 
 namespace shill {
 
+class CellularCapability;
 class Error;
 class ModemSimpleProxyInterface;
 class ProxyFactory;
@@ -133,6 +134,21 @@
   const SimLockStatus &sim_lock_status() const { return sim_lock_status_; }
   void set_sim_lock_status(const SimLockStatus &s) { sim_lock_status_ = s; }
 
+  const std::string &dbus_owner() const { return dbus_owner_; }
+  const std::string &dbus_path() const { return dbus_path_; }
+
+  ProxyFactory *proxy_factory() const { return proxy_factory_; }
+
+  void set_modem_cdma_proxy(ModemCDMAProxyInterface *proxy) {
+    cdma_proxy_.reset(proxy);
+  }
+  void set_modem_gsm_card_proxy(ModemGSMCardProxyInterface *proxy) {
+    gsm_card_proxy_.reset(proxy);
+  }
+  void set_modem_gsm_network_proxy(ModemGSMNetworkProxyInterface *proxy) {
+    gsm_network_proxy_.reset(proxy);
+  }
+
   void SetGSMAccessTechnology(uint32 access_technology);
 
   // Inherited from Device.
@@ -244,6 +260,7 @@
       StrIntPair(Cellular::*get)(void),
       void(Cellular::*set)(const StrIntPair&, Error *));
 
+  void InitCapability();
   void InitProxies();
 
   std::string GetTypeString() const;
@@ -321,6 +338,8 @@
   State state_;
   ModemState modem_state_;
 
+  scoped_ptr<CellularCapability> capability_;
+
   const std::string dbus_owner_;  // ModemManager.Modem
   const std::string dbus_path_;  // ModemManager.Modem
   scoped_ptr<ModemProxyInterface> proxy_;