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 |
Paul Stewart | 78af94c | 2013-04-17 16:02:06 -0700 | [diff] [blame] | 13 | const char Config::kDefaultRunDirectory[] = RUNDIR; |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 14 | // static |
| 15 | const char Config::kDefaultStorageDirectory[] = "/var/cache/shill"; |
| 16 | // static |
Paul Stewart | 78af94c | 2013-04-17 16:02:06 -0700 | [diff] [blame] | 17 | const char Config::kDefaultUserStorageFormat[] = RUNDIR "/user_profiles/%s"; |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 18 | // static |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 19 | const char Config::kFlimflamRunDirectory[] = "/var/run/flimflam"; |
| 20 | // static |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 21 | const char Config::kFlimflamStorageDirectory[] = "/var/cache/flimflam"; |
| 22 | // static |
| 23 | const char Config::kFlimflamUserStorageFormat[] = "/home/%s/user/flimflam"; |
| 24 | |
| 25 | Config::Config() : use_flimflam_(false) { |
| 26 | } |
| 27 | |
| 28 | Config::~Config() {} |
| 29 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 30 | std::string Config::GetRunDirectory() { |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 31 | return (use_flimflam_ ? kFlimflamRunDirectory : kDefaultRunDirectory); |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 32 | } |
| 33 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 34 | std::string Config::GetStorageDirectory() { |
Darin Petkov | 4f5e549 | 2012-04-18 14:05:55 +0200 | [diff] [blame] | 35 | return (use_flimflam_ ? kFlimflamStorageDirectory : kDefaultStorageDirectory); |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 36 | } |
| 37 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 38 | std::string Config::GetUserStorageDirectoryFormat() { |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 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 |