Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Side by Side Diff: chromeos/dbus/metronome_client.h

Issue 935933002: Adds metronome time sync dbus client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Defaults to Metronome client Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_DBUS_METRONOME_CLIENT_H_
6 #define CHROMEOS_DBUS_METRONOME_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "chromeos/dbus/dbus_client.h"
11 #include "chromeos/dbus/dbus_client_implementation_type.h"
12
13 namespace chromeos {
14
15 // A DBus client class for the org.chromium.Metronome service.
16 class MetronomeClient : public DBusClient {
17 public:
18 // Interface for observing timestamp events from a metronome client.
19 class Observer {
20 public:
21 // Called when the TimestampUpdated signal is received.
22 virtual void OnTimestampUpdated(uint64 beacon_timestamp,
23 uint64 mac_timestamp) = 0;
Ben Chan 2015/02/19 19:03:14 |beacon_timestamp| and |mac_timestamp| kinda refer
varkha 2015/02/19 20:33:43 Done.
24 };
25
26 virtual ~MetronomeClient();
27
28 // Adds and removes observers for timestamp events.
29 virtual void AddObserver(Observer* observer) = 0;
30 virtual void RemoveObserver(Observer* observer) = 0;
31
32 // Factory function, creates a new instance and returns ownership.
33 // For normal usage, access the singleton via DBusThreadManager::Get().
34 static MetronomeClient* Create(DBusClientImplementationType type);
35
36 protected:
37 // Create() should be used instead.
38 MetronomeClient();
39
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MetronomeClient);
42 };
43
44 } // namespace chromeos
45
46 #endif // CHROMEOS_DBUS_METRONOME_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698