shill: Move CDMA activation to capability delegates.

BUG=chromium-os:18735
TEST=unit tests

Change-Id: If69af7576c939eed8397797de3a2a88f7fd079e6
Reviewed-on: https://gerrit.chromium.org/gerrit/11632
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.h b/cellular.h
index 9cea7d7..c8996cc 100644
--- a/cellular.h
+++ b/cellular.h
@@ -131,6 +131,10 @@
 
   const CellularServiceRefPtr &service() const { return service_; }
 
+  static std::string GetStateString(State state);
+
+  State state() const { return state_; }
+
   void set_modem_state(ModemState state) { modem_state_ = state; }
   ModemState modem_state() const { return modem_state_; }
 
@@ -152,6 +156,11 @@
     return cdma_.registration_state_1x;
   }
 
+  uint32 cdma_activation_state() const { return cdma_.activation_state; }
+  void set_cdma_activation_state(uint32 state) {
+    cdma_.activation_state = state;
+  }
+
   const std::string &meid() const { return meid_; }
   void set_meid(const std::string &meid) { meid_ = meid; }
 
@@ -186,6 +195,8 @@
 
   void HandleNewSignalQuality(uint32 strength);
 
+  void HandleNewCDMAActivationState(uint32 error);
+
   // Inherited from Device.
   virtual void Start();
   virtual void Stop();
@@ -206,8 +217,6 @@
   friend class CellularTest;
   friend class CellularCapabilityCDMATest;
   friend class CellularCapabilityGSMTest;
-  FRIEND_TEST(CellularTest, Activate);
-  FRIEND_TEST(CellularTest, ActivateError);
   FRIEND_TEST(CellularTest, CreateService);
   FRIEND_TEST(CellularTest, Connect);
   FRIEND_TEST(CellularTest, GetCDMAActivationStateString);
@@ -215,7 +224,6 @@
   FRIEND_TEST(CellularTest, GetCDMARegistrationState);
   FRIEND_TEST(CellularTest, GetModemInfo);
   FRIEND_TEST(CellularTest, GetModemStatus);
-  FRIEND_TEST(CellularTest, GetStateString);
   FRIEND_TEST(CellularTest, GetTypeString);
   FRIEND_TEST(CellularTest, InitProxiesCDMA);
   FRIEND_TEST(CellularTest, InitProxiesGSM);
@@ -257,7 +265,6 @@
   void SetState(State state);
 
   void ConnectTask(const DBusPropertiesMap &properties);
-  void ActivateTask(const std::string &carrier);
   void RegisterOnNetworkTask(const std::string &network_id);
 
   // Invoked when the modem is connected to the cellular network to transition
@@ -275,7 +282,6 @@
   void InitProxies();
 
   std::string GetTypeString() const;
-  static std::string GetStateString(State state);
 
   static std::string GetCDMAActivationStateString(uint32 state);
   static std::string GetCDMAActivationErrorString(uint32 error);
@@ -299,8 +305,6 @@
 
   void CreateService();
 
-  void HandleNewCDMAActivationState(uint32 error);
-
   // Updates the GSM operator name and country based on a newly obtained network
   // id.
   void UpdateGSMOperatorInfo();