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

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

Issue 910023002: device/bluetooth:Implement BluetoothMediaEndpointServiceProvider delegate and media-related overrid… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the addition/removal of all types of observer to constructor/destructor. 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
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_media_endpoint_service_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium 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 CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_ 6 #define CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Called when the Media object with object path |object_path| is added to 48 // Called when the Media object with object path |object_path| is added to
49 // the system. 49 // the system.
50 virtual void MediaAdded(const dbus::ObjectPath& object_path) {} 50 virtual void MediaAdded(const dbus::ObjectPath& object_path) {}
51 51
52 // Called when the Media object with object path |object_path| is removed 52 // Called when the Media object with object path |object_path| is removed
53 // from the system. 53 // from the system.
54 virtual void MediaRemoved(const dbus::ObjectPath& object_path) {} 54 virtual void MediaRemoved(const dbus::ObjectPath& object_path) {}
55 }; 55 };
56 56
57 // Constants used to indicate exceptional error conditions.
58 static const char kNoResponseError[];
59
60 // The string representation for the 128-bit UUID for A2DP Sink.
61 static const char kBluetoothAudioSinkUUID[];
62
57 ~BluetoothMediaClient() override; 63 ~BluetoothMediaClient() override;
58 64
59 // The ErrorCallback is used by media API methods to indicate failure. 65 // The ErrorCallback is used by media API methods to indicate failure.
60 // It receives two arguments: the name of the error in |error_name| and 66 // It receives two arguments: the name of the error in |error_name| and
61 // an optional message in |error_message|. 67 // an optional message in |error_message|.
62 typedef base::Callback<void(const std::string& error_name, 68 typedef base::Callback<void(const std::string& error_name,
63 const std::string& error_message)> ErrorCallback; 69 const std::string& error_message)> ErrorCallback;
64 70
65 // Adds and removes observers for events on all Media objects. Check the 71 // Adds and removes observers for events on all Media objects. Check the
66 // |object_path| parameter of observer methods to determine which Media object 72 // |object_path| parameter of observer methods to determine which Media object
(...skipping 15 matching lines...) Expand all
82 virtual void UnregisterEndpoint(const dbus::ObjectPath& object_path, 88 virtual void UnregisterEndpoint(const dbus::ObjectPath& object_path,
83 const dbus::ObjectPath& endpoint_path, 89 const dbus::ObjectPath& endpoint_path,
84 const base::Closure& callback, 90 const base::Closure& callback,
85 const ErrorCallback& error_callback) = 0; 91 const ErrorCallback& error_callback) = 0;
86 92
87 // TODO(mcchou): The RegisterPlayer and UnregisterPlayer methods are not 93 // TODO(mcchou): The RegisterPlayer and UnregisterPlayer methods are not
88 // included, since they are not used. These two methods may be added later. 94 // included, since they are not used. These two methods may be added later.
89 95
90 static BluetoothMediaClient* Create(); 96 static BluetoothMediaClient* Create();
91 97
92 // Constants used to indicate exceptional error conditions.
93 static const char kNoResponseError[];
94
95 // The string representation for the 128-bit UUID for A2DP Sink.
96 static const char kBluetoothAudioSinkUUID[];
97
98 protected: 98 protected:
99 BluetoothMediaClient(); 99 BluetoothMediaClient();
100 100
101 private: 101 private:
102 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaClient); 102 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaClient);
103 }; 103 };
104 104
105 } // namespace chromeos 105 } // namespace chromeos
106 106
107 #endif // CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_ 107 #endif // CHROMEOS_DBUS_BLUETOOTH_MEDIA_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_media_endpoint_service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698