Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010, 2011 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SRC_DEVICE_H_ | 5 #ifndef SRC_DEVICE_H_ |
| 6 #define SRC_DEVICE_H_ | 6 #define SRC_DEVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include <base/basictypes.h> // NOLINT | 10 #include <base/basictypes.h> // NOLINT |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 // returns true on success and false on failure | 57 // returns true on success and false on failure |
| 58 virtual bool StartByteCounter() = 0; | 58 virtual bool StartByteCounter() = 0; |
| 59 | 59 |
| 60 // destroy any existing byte counter | 60 // destroy any existing byte counter |
| 61 // |parent_| will no longer receive updates after this call | 61 // |parent_| will no longer receive updates after this call |
| 62 virtual void StopByteCounter() = 0; | 62 virtual void StopByteCounter() = 0; |
| 63 | 63 |
| 64 // is the byte counter running? | 64 // is the byte counter running? |
| 65 virtual bool ByteCounterRunning() const = 0; | 65 virtual bool ByteCounterRunning() const = 0; |
| 66 | 66 |
| 67 // reset byte counter to an arbitrary baseline value | |
| 68 // counter will continue to run and increment relative to new baseline | |
| 69 // there must be an existing byte counter | |
| 70 // |parent_| must already have received at least one update | |
|
Eric Shienbrood
2011/02/10 18:47:00
parent_ is in the implementation class, so it's ki
Vince Laviano
2011/02/10 22:29:19
Done.
| |
| 71 virtual void ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes) = 0; | |
| 72 | |
| 67 // factory | 73 // factory |
| 68 static Device* NewDevice(Service * const parent, | 74 static Device* NewDevice(Service * const parent, |
| 69 DBus::Connection& connection, // NOLINT | 75 DBus::Connection& connection, // NOLINT |
| 70 const DBus::Path& path); | 76 const DBus::Path& path); |
| 71 | 77 |
| 72 private: | 78 private: |
| 73 DISALLOW_COPY_AND_ASSIGN(Device); | 79 DISALLOW_COPY_AND_ASSIGN(Device); |
| 74 }; | 80 }; |
| 75 | 81 |
| 76 } // namespace cashew | 82 } // namespace cashew |
| 77 | 83 |
| 78 #endif // SRC_DEVICE_H_ | 84 #endif // SRC_DEVICE_H_ |
| OLD | NEW |