Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 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 |
Paul Stewart | fe4012b | 2012-09-25 07:55:03 -0700 | [diff] [blame^] | 17 | const char Config::kDefaultUserStorageFormat[] = |
| 18 | "/var/run/shill/user_profiles/%s"; |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 19 | // static |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 20 | const char Config::kFlimflamRunDirectory[] = "/var/run/flimflam"; |
| 21 | // static |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 22 | const char Config::kFlimflamStorageDirectory[] = "/var/cache/flimflam"; |
| 23 | // static |
| 24 | const char Config::kFlimflamUserStorageFormat[] = "/home/%s/user/flimflam"; |
| 25 | |
| 26 | Config::Config() : use_flimflam_(false) { |
| 27 | } |
| 28 | |
| 29 | Config::~Config() {} |
| 30 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 31 | std::string Config::GetRunDirectory() { |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 32 | return (use_flimflam_ ? kFlimflamRunDirectory : kDefaultRunDirectory); |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 33 | } |
| 34 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 35 | std::string Config::GetStorageDirectory() { |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 36 | return (use_flimflam_ ? kFlimflamStorageDirectory : kDefaultStorageDirectory); |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 37 | } |
| 38 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 39 | std::string Config::GetUserStorageDirectoryFormat() { |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 40 | return (use_flimflam_ ? |
| 41 | kFlimflamUserStorageFormat : |
| 42 | kDefaultUserStorageFormat); |
| 43 | } |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 44 | |
| 45 | } // namespace shill |