Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 1 | // 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 | |
| 5 | #include "shill/shill_config.h" |
| 6 | |
| 7 | namespace shill { |
| 8 | |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 9 | // static |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 10 | const char Config::kShillDefaultPrefsDir[] = "/var/lib/shill"; |
| 11 | |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 12 | // static |
| 13 | const char Config::kDefaultRunDirectory[] = "/var/run/shill"; |
| 14 | // static |
| 15 | const char Config::kDefaultStorageDirectory[] = "/var/cache/shill"; |
| 16 | // static |
| 17 | const char Config::kDefaultUserStorageFormat[] = "/home/%s/user/shill"; |
| 18 | // static |
| 19 | const char Config::kFlimflamStorageDirectory[] = "/var/cache/flimflam"; |
| 20 | // static |
| 21 | const char Config::kFlimflamUserStorageFormat[] = "/home/%s/user/flimflam"; |
| 22 | |
| 23 | Config::Config() : use_flimflam_(false) { |
| 24 | } |
| 25 | |
| 26 | Config::~Config() {} |
| 27 | |
| 28 | std::string Config::RunDirectory() { |
| 29 | return kDefaultRunDirectory; |
| 30 | } |
| 31 | |
| 32 | std::string Config::StorageDirectory() { |
| 33 | return (use_flimflam_ ? |
| 34 | kFlimflamStorageDirectory : |
| 35 | kDefaultStorageDirectory); |
| 36 | } |
| 37 | |
| 38 | std::string Config::UserStorageDirectoryFormat() { |
| 39 | return (use_flimflam_ ? |
| 40 | kFlimflamUserStorageFormat : |
| 41 | kDefaultUserStorageFormat); |
| 42 | } |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 43 | |
| 44 | } // namespace shill |