| 1 |
/* |
| 2 |
* Copyright (C) 2017 The Android Open Source Project |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specic language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
#ifndef ANDROID_LIBPERFMGR_PROPERTYNODE_H_ |
| 18 |
#define ANDROID_LIBPERFMGR_PROPERTYNODE_H_ |
| 19 |
|
| 20 |
#include <cstddef> |
| 21 |
#include <string> |
| 22 |
#include <vector> |
| 23 |
|
| 24 |
#include "perfmgr/Node.h" |
| 25 |
|
| 26 |
namespace android { |
| 27 |
namespace perfmgr { |
| 28 |
|
| 29 |
// PropertyNode represents managed system properties |
| 30 |
class PropertyNode : public Node { |
| 31 |
public: |
| 32 |
PropertyNode(std::string name, std::string node_path, |
| 33 |
std::vector<RequestGroup> req_sorted, |
| 34 |
std::size_t default_val_index, bool reset_on_init); |
| 35 |
|
| 36 |
std::chrono::milliseconds Update(bool log_error) override; |
| 37 |
|
| 38 |
void DumpToFd(int fd) const override; |
| 39 |
|
| 40 |
private: |
| 41 |
PropertyNode(const Node& other) = delete; |
| 42 |
PropertyNode& operator=(Node const&) = delete; |
| 43 |
}; |
| 44 |
|
| 45 |
} // namespace perfmgr |
| 46 |
} // namespace android |
| 47 |
|
| 48 |
#endif // ANDROID_LIBPERFMGR_PROPERTYNODE_H_ |