| 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_IMPL_H_ | 5 #ifndef SRC_DEVICE_IMPL_H_ |
| 6 #define SRC_DEVICE_IMPL_H_ | 6 #define SRC_DEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <glib.h> | 8 #include <glib.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // PropertyChangedDelegate methods | 47 // PropertyChangedDelegate methods |
| 48 | 48 |
| 49 virtual void OnPropertyChanged(const PropertyChangedHandler *handler, | 49 virtual void OnPropertyChanged(const PropertyChangedHandler *handler, |
| 50 const std::string& property_name, | 50 const std::string& property_name, |
| 51 const DBus::Variant& new_value); | 51 const DBus::Variant& new_value); |
| 52 | 52 |
| 53 // Service methods | 53 // Service methods |
| 54 virtual bool StartByteCounter(); | 54 virtual bool StartByteCounter(); |
| 55 virtual void StopByteCounter(); | 55 virtual void StopByteCounter(); |
| 56 virtual bool ByteCounterRunning() const; | 56 virtual bool ByteCounterRunning() const; |
| 57 virtual void ResetByteCounter(uint64 rx_bytes, uint64 tx_bytes); |
| 57 | 58 |
| 58 // ByteCounterDelegate methods | 59 // ByteCounterDelegate methods |
| 59 | 60 |
| 60 // called when bye counter is updated | 61 // called when byte counter is updated |
| 61 virtual void OnByteCounterUpdate(const ByteCounter *counter, | 62 virtual void OnByteCounterUpdate(const ByteCounter *counter, |
| 62 uint64 rx_bytes, uint64 tx_bytes); | 63 uint64 rx_bytes, uint64 tx_bytes); |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 // back pointer to our parent Service | 66 // back pointer to our parent Service |
| 66 Service * const parent_; | 67 Service * const parent_; |
| 67 | 68 |
| 68 // D-Bus path for Flimflam device that we represent | 69 // D-Bus path for Flimflam device that we represent |
| 69 // this is our unique identifier | 70 // this is our unique identifier |
| 70 const DBus::Path path_; | 71 const DBus::Path path_; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 127 |
| 127 // delete byte counter object pointed to by |byte_counter_| if any | 128 // delete byte counter object pointed to by |byte_counter_| if any |
| 128 void DeleteByteCounter(); | 129 void DeleteByteCounter(); |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(DeviceImpl); | 131 DISALLOW_COPY_AND_ASSIGN(DeviceImpl); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace cashew | 134 } // namespace cashew |
| 134 | 135 |
| 135 #endif // SRC_DEVICE_IMPL_H_ | 136 #endif // SRC_DEVICE_IMPL_H_ |
| OLD | NEW |