blob: f8ebd5354e4a742bb7f52b56dbf230e76c64cfe3 [file] [log] [blame]
Paul Stewart75897df2011-04-27 09:05:53 -07001// Copyright (c) 2011 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
Chris Masone8fe2c7e2011-06-09 15:51:19 -07005#include "shill/manager.h"
6
Paul Stewart75897df2011-04-27 09:05:53 -07007#include <time.h>
Paul Stewart75897df2011-04-27 09:05:53 -07008#include <stdio.h>
Chris Masoneee929b72011-05-10 10:02:18 -07009
Paul Stewart22aa71b2011-09-16 12:15:11 -070010#include <algorithm>
mukesh agrawal7a4e4002011-09-06 11:26:05 -070011#include <map>
Paul Stewart75897df2011-04-27 09:05:53 -070012#include <string>
Chris Masone52cd19b2011-06-29 17:23:04 -070013#include <vector>
Paul Stewart75897df2011-04-27 09:05:53 -070014
Paul Stewarte6132022011-08-16 09:11:02 -070015#include <base/file_util.h>
Chris Masoneee929b72011-05-10 10:02:18 -070016#include <base/logging.h>
Chris Masone9be4a9d2011-05-16 15:44:09 -070017#include <base/memory/ref_counted.h>
Paul Stewart22aa71b2011-09-16 12:15:11 -070018#include <base/string_split.h>
19#include <base/string_util.h>
Chris Masone3bd3c8c2011-06-13 08:20:26 -070020#include <chromeos/dbus/service_constants.h>
Chris Masoneee929b72011-05-10 10:02:18 -070021
Chris Masoned0ceb8c2011-06-02 10:05:39 -070022#include "shill/adaptor_interfaces.h"
Paul Stewart75897df2011-04-27 09:05:53 -070023#include "shill/control_interface.h"
Chris Masoned0ceb8c2011-06-02 10:05:39 -070024#include "shill/dbus_adaptor.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070025#include "shill/default_profile.h"
Chris Masone9be4a9d2011-05-16 15:44:09 -070026#include "shill/device.h"
27#include "shill/device_info.h"
Chris Masone6791a432011-07-12 13:23:19 -070028#include "shill/ephemeral_profile.h"
Chris Masone8fe2c7e2011-06-09 15:51:19 -070029#include "shill/error.h"
Chris Masone9d779932011-08-25 16:33:41 -070030#include "shill/key_file_store.h"
Paul Stewart22aa71b2011-09-16 12:15:11 -070031#include "shill/service_sorter.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070032#include "shill/profile.h"
Chris Masoneb925cc82011-06-22 15:39:57 -070033#include "shill/property_accessor.h"
Paul Stewarte6132022011-08-16 09:11:02 -070034#include "shill/resolver.h"
Chris Masone9be4a9d2011-05-16 15:44:09 -070035#include "shill/shill_event.h"
36#include "shill/service.h"
mukesh agrawal7a4e4002011-09-06 11:26:05 -070037#include "shill/wifi.h"
38#include "shill/wifi_service.h"
Paul Stewart75897df2011-04-27 09:05:53 -070039
Paul Stewart22aa71b2011-09-16 12:15:11 -070040using std::map;
Paul Stewart75897df2011-04-27 09:05:53 -070041using std::string;
Chris Masone9be4a9d2011-05-16 15:44:09 -070042using std::vector;
Paul Stewart75897df2011-04-27 09:05:53 -070043
44namespace shill {
Paul Stewarte6132022011-08-16 09:11:02 -070045
mukesh agrawal7a4e4002011-09-06 11:26:05 -070046// static
47const char Manager::kManagerErrorNoDevice[] = "no wifi devices available";
48
Paul Stewart75897df2011-04-27 09:05:53 -070049Manager::Manager(ControlInterface *control_interface,
Darin Petkov887f2982011-07-14 16:10:17 -070050 EventDispatcher *dispatcher,
Chris Masone2ae797d2011-08-23 20:41:00 -070051 GLib *glib,
52 const string &run_directory,
53 const string &storage_directory,
54 const string &user_storage_format)
55 : run_path_(FilePath(run_directory)),
56 storage_path_(FilePath(storage_directory)),
57 user_storage_format_(user_storage_format),
Paul Stewarte6132022011-08-16 09:11:02 -070058 adaptor_(control_interface->CreateManagerAdaptor(this)),
Paul Stewartb50f0b92011-05-16 16:31:42 -070059 device_info_(control_interface, dispatcher, this),
Darin Petkov887f2982011-07-14 16:10:17 -070060 modem_info_(control_interface, dispatcher, this, glib),
Chris Masone6791a432011-07-12 13:23:19 -070061 running_(false),
Chris Masone9d779932011-08-25 16:33:41 -070062 ephemeral_profile_(new EphemeralProfile(control_interface, this)),
Chris Masone2ae797d2011-08-23 20:41:00 -070063 control_interface_(control_interface),
64 glib_(glib) {
Chris Masone7aa5f902011-07-11 11:13:35 -070065 HelpRegisterDerivedString(flimflam::kActiveProfileProperty,
66 &Manager::GetActiveProfileName,
67 NULL);
Chris Masone27c4aa52011-07-02 13:10:14 -070068 HelpRegisterDerivedStrings(flimflam::kAvailableTechnologiesProperty,
69 &Manager::AvailableTechnologies,
70 NULL);
Chris Masone88cbd5f2011-07-03 14:30:04 -070071 store_.RegisterString(flimflam::kCheckPortalListProperty,
72 &props_.check_portal_list);
Chris Masone27c4aa52011-07-02 13:10:14 -070073 HelpRegisterDerivedStrings(flimflam::kConnectedTechnologiesProperty,
74 &Manager::ConnectedTechnologies,
75 NULL);
Chris Masone88cbd5f2011-07-03 14:30:04 -070076 store_.RegisterString(flimflam::kCountryProperty, &props_.country);
Chris Masone27c4aa52011-07-02 13:10:14 -070077 HelpRegisterDerivedString(flimflam::kDefaultTechnologyProperty,
78 &Manager::DefaultTechnology,
79 NULL);
Chris Masone27c4aa52011-07-02 13:10:14 -070080 HelpRegisterDerivedStrings(flimflam::kDevicesProperty,
81 &Manager::EnumerateDevices,
82 NULL);
Chris Masone88cbd5f2011-07-03 14:30:04 -070083 HelpRegisterDerivedStrings(flimflam::kEnabledTechnologiesProperty,
84 &Manager::EnabledTechnologies,
85 NULL);
86 store_.RegisterBool(flimflam::kOfflineModeProperty, &props_.offline_mode);
87 store_.RegisterString(flimflam::kPortalURLProperty, &props_.portal_url);
88 HelpRegisterDerivedString(flimflam::kStateProperty,
89 &Manager::CalculateState,
90 NULL);
Chris Masone27c4aa52011-07-02 13:10:14 -070091 HelpRegisterDerivedStrings(flimflam::kServicesProperty,
92 &Manager::EnumerateAvailableServices,
93 NULL);
94 HelpRegisterDerivedStrings(flimflam::kServiceWatchListProperty,
95 &Manager::EnumerateWatchedServices,
96 NULL);
Chris Masone3c3f6a12011-07-01 10:01:41 -070097
Chris Masone4d42df82011-07-02 17:09:39 -070098 // TODO(cmasone): Wire these up once we actually put in profile support.
Chris Masoneb925cc82011-06-22 15:39:57 -070099 // known_properties_.push_back(flimflam::kProfilesProperty);
Chris Masone2ae797d2011-08-23 20:41:00 -0700100 profiles_.push_back(new DefaultProfile(control_interface_,
Chris Masone6791a432011-07-12 13:23:19 -0700101 this,
Chris Masone2ae797d2011-08-23 20:41:00 -0700102 storage_path_,
Chris Masone6791a432011-07-12 13:23:19 -0700103 props_));
Chris Masoneb07006b2011-05-14 16:10:04 -0700104 VLOG(2) << "Manager initialized.";
Paul Stewart75897df2011-04-27 09:05:53 -0700105}
106
Chris Masone6791a432011-07-12 13:23:19 -0700107Manager::~Manager() {
Chris Masone9d779932011-08-25 16:33:41 -0700108 profiles_.clear();
Chris Masone6791a432011-07-12 13:23:19 -0700109}
Paul Stewart75897df2011-04-27 09:05:53 -0700110
mukesh agrawal8f317b62011-07-15 11:53:23 -0700111void Manager::AddDeviceToBlackList(const string &device_name) {
112 device_info_.AddDeviceToBlackList(device_name);
113}
114
Paul Stewart75897df2011-04-27 09:05:53 -0700115void Manager::Start() {
Paul Stewart0af98bf2011-05-10 17:38:08 -0700116 LOG(INFO) << "Manager started.";
Paul Stewarte6132022011-08-16 09:11:02 -0700117
Chris Masone2ae797d2011-08-23 20:41:00 -0700118 CHECK(file_util::CreateDirectory(run_path_)) << run_path_.value();
Paul Stewarte6132022011-08-16 09:11:02 -0700119 Resolver::GetInstance()->set_path(run_path_.Append("resolv.conf"));
Chris Masone2ae797d2011-08-23 20:41:00 -0700120
121 CHECK(file_util::CreateDirectory(storage_path_)) << storage_path_.value();
122
Paul Stewart75897df2011-04-27 09:05:53 -0700123 running_ = true;
Chris Masone413a3192011-05-09 17:10:05 -0700124 adaptor_->UpdateRunning();
Paul Stewart0af98bf2011-05-10 17:38:08 -0700125 device_info_.Start();
Darin Petkov887f2982011-07-14 16:10:17 -0700126 modem_info_.Start();
Paul Stewart75897df2011-04-27 09:05:53 -0700127}
128
129void Manager::Stop() {
130 running_ = false;
Chris Masone9d779932011-08-25 16:33:41 -0700131 // Persist profile, device, service information to disk.
132 vector<ProfileRefPtr>::iterator it;
133 for (it = profiles_.begin(); it != profiles_.end(); ++it) {
134 KeyFileStore storage(glib_);
135 FilePath profile_path;
136 CHECK((*it)->GetStoragePath(&profile_path));
137 storage.set_path(profile_path);
138 if (storage.Open()) {
139 (*it)->Finalize(&storage);
140 storage.Close();
141 } else {
142 LOG(ERROR) << "Could not open storage at " << profile_path.value();
143 }
144 }
145 ephemeral_profile_->Finalize(NULL);
146
Chris Masone413a3192011-05-09 17:10:05 -0700147 adaptor_->UpdateRunning();
Darin Petkov887f2982011-07-14 16:10:17 -0700148 modem_info_.Stop();
149 device_info_.Stop();
Paul Stewart75897df2011-04-27 09:05:53 -0700150}
151
Chris Masone7aa5f902011-07-11 11:13:35 -0700152const ProfileRefPtr &Manager::ActiveProfile() {
153 return profiles_.back();
154}
155
Chris Masone6791a432011-07-12 13:23:19 -0700156bool Manager::MoveToActiveProfile(const ProfileRefPtr &from,
157 const ServiceRefPtr &to_move) {
158 return ActiveProfile()->AdoptService(to_move) &&
159 from->AbandonService(to_move->UniqueName());
160}
161
Chris Masone2b105542011-06-22 10:58:09 -0700162void Manager::RegisterDevice(const DeviceRefPtr &to_manage) {
Chris Masone157aa0c2011-10-03 09:24:31 -0700163 // TODO(pstew): Should DefaultProfile have a list of devices, analogous to
164 // the list of services that it manages? If so, we should do a similar merge
165 // thing here.
166
Chris Masonec1e50412011-06-07 13:04:53 -0700167 vector<DeviceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700168 for (it = devices_.begin(); it != devices_.end(); ++it) {
Chris Masonec1e50412011-06-07 13:04:53 -0700169 if (to_manage.get() == it->get())
Chris Masone9be4a9d2011-05-16 15:44:09 -0700170 return;
171 }
Chris Masonec1e50412011-06-07 13:04:53 -0700172 devices_.push_back(to_manage);
Paul Stewartf1ce5d22011-05-19 13:10:20 -0700173
174 // TODO(pstew): Should check configuration
175 if (running_)
176 to_manage->Start();
Chris Masone9be4a9d2011-05-16 15:44:09 -0700177}
178
mukesh agrawal5029c6c2011-08-25 11:12:40 -0700179void Manager::DeregisterDevice(const DeviceRefPtr &to_forget) {
Chris Masonec1e50412011-06-07 13:04:53 -0700180 vector<DeviceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700181 for (it = devices_.begin(); it != devices_.end(); ++it) {
Chris Masonec1e50412011-06-07 13:04:53 -0700182 if (to_forget.get() == it->get()) {
mukesh agrawal5029c6c2011-08-25 11:12:40 -0700183 VLOG(2) << "Deregistered device: " << to_forget->UniqueName();
184 to_forget->Stop();
Chris Masone9be4a9d2011-05-16 15:44:09 -0700185 devices_.erase(it);
186 return;
187 }
188 }
mukesh agrawal5029c6c2011-08-25 11:12:40 -0700189 VLOG(2) << __func__ << " unknown device: " << to_forget->UniqueName();
Chris Masone9be4a9d2011-05-16 15:44:09 -0700190}
191
Chris Masone2b105542011-06-22 10:58:09 -0700192void Manager::RegisterService(const ServiceRefPtr &to_manage) {
Chris Masone157aa0c2011-10-03 09:24:31 -0700193 for (vector<ProfileRefPtr>::iterator it = profiles_.begin();
194 it != profiles_.end();
195 ++it) {
196 if ((*it)->MergeService(to_manage)) // this will merge, if possible.
197 break;
198 }
Chris Masone6791a432011-07-12 13:23:19 -0700199
200 // If not found, add it to the ephemeral profile
201 ephemeral_profile_->AdoptService(to_manage);
202
203 // Now add to OUR list.
204 // TODO(cmasone): Keep this list sorted.
Chris Masonec1e50412011-06-07 13:04:53 -0700205 vector<ServiceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700206 for (it = services_.begin(); it != services_.end(); ++it) {
Chris Masone6791a432011-07-12 13:23:19 -0700207 if (to_manage->UniqueName() == (*it)->UniqueName())
Chris Masone9be4a9d2011-05-16 15:44:09 -0700208 return;
209 }
Chris Masonec1e50412011-06-07 13:04:53 -0700210 services_.push_back(to_manage);
Paul Stewart22aa71b2011-09-16 12:15:11 -0700211 SortServices();
mukesh agrawal32399322011-09-01 10:53:43 -0700212
213 vector<string> service_paths;
214 for (it = services_.begin(); it != services_.end(); ++it) {
215 service_paths.push_back((*it)->GetRpcIdentifier());
216 }
217 adaptor_->EmitRpcIdentifierArrayChanged(flimflam::kServicesProperty,
218 service_paths);
Chris Masone9be4a9d2011-05-16 15:44:09 -0700219}
220
Chris Masone2b105542011-06-22 10:58:09 -0700221void Manager::DeregisterService(const ServiceConstRefPtr &to_forget) {
Chris Masone6791a432011-07-12 13:23:19 -0700222 // If the service is in the ephemeral profile, destroy it.
223 if (!ephemeral_profile_->AbandonService(to_forget->UniqueName())) {
224 // if it's in one of the real profiles...um...I guess mark it unconnectable?
225 }
Chris Masonec1e50412011-06-07 13:04:53 -0700226 vector<ServiceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700227 for (it = services_.begin(); it != services_.end(); ++it) {
Chris Masone6791a432011-07-12 13:23:19 -0700228 if (to_forget->UniqueName() == (*it)->UniqueName()) {
Chris Masone9be4a9d2011-05-16 15:44:09 -0700229 services_.erase(it);
Paul Stewart22aa71b2011-09-16 12:15:11 -0700230 SortServices();
Chris Masone9be4a9d2011-05-16 15:44:09 -0700231 return;
232 }
233 }
234}
235
Paul Stewart03dba0b2011-08-22 16:32:45 -0700236void Manager::UpdateService(const ServiceConstRefPtr &to_update) {
237 LOG(INFO) << "Service " << to_update->UniqueName() << " updated;"
238 << " state: " << to_update->state() << " failure: "
239 << to_update->failure();
Paul Stewart22aa71b2011-09-16 12:15:11 -0700240 SortServices();
Paul Stewart03dba0b2011-08-22 16:32:45 -0700241}
242
Paul Stewartfdd16072011-09-16 12:41:35 -0700243void Manager::FilterByTechnology(Technology::Identifier tech,
Chris Masonec1e50412011-06-07 13:04:53 -0700244 vector<DeviceRefPtr> *found) {
Chris Masone9be4a9d2011-05-16 15:44:09 -0700245 CHECK(found);
Chris Masonec1e50412011-06-07 13:04:53 -0700246 vector<DeviceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700247 for (it = devices_.begin(); it != devices_.end(); ++it) {
248 if ((*it)->TechnologyIs(tech))
249 found->push_back(*it);
250 }
251}
252
Paul Stewart22aa71b2011-09-16 12:15:11 -0700253ServiceRefPtr Manager::FindService(const string& name) {
Chris Masonec1e50412011-06-07 13:04:53 -0700254 vector<ServiceRefPtr>::iterator it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700255 for (it = services_.begin(); it != services_.end(); ++it) {
Chris Masone6791a432011-07-12 13:23:19 -0700256 if (name == (*it)->UniqueName())
Chris Masonee0dea762011-06-09 09:06:03 -0700257 return *it;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700258 }
Chris Masonee0dea762011-06-09 09:06:03 -0700259 return NULL;
Chris Masone9be4a9d2011-05-16 15:44:09 -0700260}
261
mukesh agrawalffa3d042011-10-06 15:26:10 -0700262void Manager::HelpRegisterDerivedString(
263 const string &name,
264 string(Manager::*get)(void),
265 void(Manager::*set)(const string&, Error *)) {
Chris Masone27c4aa52011-07-02 13:10:14 -0700266 store_.RegisterDerivedString(
267 name,
268 StringAccessor(new CustomAccessor<Manager, string>(this, get, set)));
Chris Masoneb925cc82011-06-22 15:39:57 -0700269}
270
mukesh agrawalffa3d042011-10-06 15:26:10 -0700271void Manager::HelpRegisterDerivedStrings(
272 const string &name,
273 Strings(Manager::*get)(void),
274 void(Manager::*set)(const Strings &, Error *)) {
Chris Masone27c4aa52011-07-02 13:10:14 -0700275 store_.RegisterDerivedStrings(
276 name,
277 StringsAccessor(new CustomAccessor<Manager, Strings>(this, get, set)));
Chris Masoneb925cc82011-06-22 15:39:57 -0700278}
279
Paul Stewart22aa71b2011-09-16 12:15:11 -0700280void Manager::SortServices() {
281 sort(services_.begin(), services_.end(), ServiceSorter(technology_order_));
282}
283
Chris Masoneb925cc82011-06-22 15:39:57 -0700284string Manager::CalculateState() {
285 return flimflam::kStateOffline;
286}
287
288vector<string> Manager::AvailableTechnologies() {
289 return vector<string>();
290}
291
292vector<string> Manager::ConnectedTechnologies() {
293 return vector<string>();
294}
295
296string Manager::DefaultTechnology() {
297 return "";
298}
299
300vector<string> Manager::EnabledTechnologies() {
301 return vector<string>();
302}
303
Chris Masone3c3f6a12011-07-01 10:01:41 -0700304vector<string> Manager::EnumerateDevices() {
305 vector<string> device_rpc_ids;
306 for (vector<DeviceRefPtr>::const_iterator it = devices_.begin();
307 it != devices_.end();
308 ++it) {
309 device_rpc_ids.push_back((*it)->GetRpcIdentifier());
310 }
311 return device_rpc_ids;
312}
313
314vector<string> Manager::EnumerateAvailableServices() {
Chris Masone3c3f6a12011-07-01 10:01:41 -0700315 vector<string> service_rpc_ids;
316 for (vector<ServiceRefPtr>::const_iterator it = services_.begin();
317 it != services_.end();
318 ++it) {
319 service_rpc_ids.push_back((*it)->GetRpcIdentifier());
320 }
321 return service_rpc_ids;
322}
323
324vector<string> Manager::EnumerateWatchedServices() {
Chris Masone6791a432011-07-12 13:23:19 -0700325 // TODO(cmasone): Filter this list for services in appropriate states.
Chris Masone3c3f6a12011-07-01 10:01:41 -0700326 return EnumerateAvailableServices();
327}
328
Chris Masone7aa5f902011-07-11 11:13:35 -0700329string Manager::GetActiveProfileName() {
Chris Masone7df0c672011-07-15 10:24:54 -0700330 return ActiveProfile()->GetFriendlyName();
Chris Masone7aa5f902011-07-11 11:13:35 -0700331}
332
mukesh agrawal32399322011-09-01 10:53:43 -0700333// called via RPC (e.g., from ManagerDBusAdaptor)
mukesh agrawal7a4e4002011-09-06 11:26:05 -0700334WiFiServiceRefPtr Manager::GetWifiService(const KeyValueStore &args,
335 Error *error) {
336 std::vector<DeviceRefPtr> wifi_devices;
Paul Stewart22aa71b2011-09-16 12:15:11 -0700337 FilterByTechnology(Technology::kWifi, &wifi_devices);
mukesh agrawal7a4e4002011-09-06 11:26:05 -0700338 if (wifi_devices.empty()) {
339 error->Populate(Error::kInvalidArguments, kManagerErrorNoDevice);
340 return NULL;
341 } else {
342 WiFi *wifi = dynamic_cast<WiFi *>(wifi_devices.front().get());
343 CHECK(wifi);
344 return wifi->GetService(args, error);
345 }
346}
347
348// called via RPC (e.g., from ManagerDBusAdaptor)
Paul Stewart22aa71b2011-09-16 12:15:11 -0700349void Manager::RequestScan(const string &technology, Error *error) {
mukesh agrawal32399322011-09-01 10:53:43 -0700350 if (technology == flimflam::kTypeWifi || technology == "") {
351 vector<DeviceRefPtr> wifi_devices;
Paul Stewartfdd16072011-09-16 12:41:35 -0700352 FilterByTechnology(Technology::kWifi, &wifi_devices);
mukesh agrawal32399322011-09-01 10:53:43 -0700353
354 for (vector<DeviceRefPtr>::iterator it = wifi_devices.begin();
355 it != wifi_devices.end();
356 ++it) {
Darin Petkovc0865312011-09-16 15:31:20 -0700357 (*it)->Scan(error);
mukesh agrawal32399322011-09-01 10:53:43 -0700358 }
359 } else {
360 // TODO(quiche): support scanning for other technologies?
361 const string kMessage = "Unrecognized technology " + technology;
362 LOG(ERROR) << kMessage;
363 CHECK(error);
364 error->Populate(Error::kInvalidArguments, kMessage);
365 }
366}
367
Paul Stewart22aa71b2011-09-16 12:15:11 -0700368string Manager::GetTechnologyOrder() {
369 vector<string> technology_names;
370 for (vector<Technology::Identifier>::iterator it = technology_order_.begin();
371 it != technology_order_.end();
372 ++it) {
373 technology_names.push_back(Technology::NameFromIdentifier(*it));
374 }
375
376 return JoinString(technology_names, ',');
377}
378
379void Manager::SetTechnologyOrder(const string &order, Error *error) {
380 vector<Technology::Identifier> new_order;
381 map<Technology::Identifier, bool> seen;
382
383 vector<string> order_parts;
384 base::SplitString(order, ',', &order_parts);
385
386 for (vector<string>::iterator it = order_parts.begin();
387 it != order_parts.end();
388 ++it) {
389 Technology::Identifier identifier = Technology::IdentifierFromName(*it);
390
391 if (identifier == Technology::kUnknown) {
392 error->Populate(Error::kInvalidArguments, *it +
393 " is an unknown technology name");
394 return;
395 }
396
397 if (ContainsKey(seen, identifier)) {
398 error->Populate(Error::kInvalidArguments, *it +
399 " is duplicated in the list");
400 return;
401 }
402 seen[identifier] = true;
403 new_order.push_back(identifier);
404 }
405
406 technology_order_ = new_order;
407 SortServices();
408}
409
Paul Stewart75897df2011-04-27 09:05:53 -0700410} // namespace shill