OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Client code to talk to the Media Transfer Protocol daemon. The MTP daemon is | 5 // Client code to talk to the Media Transfer Protocol daemon. The MTP daemon is |
6 // responsible for communicating with PTP / MTP capable devices like cameras | 6 // responsible for communicating with PTP / MTP capable devices like cameras |
7 // and smartphones. | 7 // and smartphones. |
8 | 8 |
9 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ | 9 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ |
10 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ | 10 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 uint32 file_id, | 156 uint32 file_id, |
157 const GetFileInfoCallback& callback, | 157 const GetFileInfoCallback& callback, |
158 const ErrorCallback& error_callback) = 0; | 158 const ErrorCallback& error_callback) = 0; |
159 | 159 |
160 // Registers given callback for events. | 160 // Registers given callback for events. |
161 // |storage_event_handler| is called when a mtp storage attach or detach | 161 // |storage_event_handler| is called when a mtp storage attach or detach |
162 // signal is received. | 162 // signal is received. |
163 virtual void SetUpConnections(const MTPStorageEventHandler& handler) = 0; | 163 virtual void SetUpConnections(const MTPStorageEventHandler& handler) = 0; |
164 | 164 |
165 // Factory function, creates a new instance and returns ownership. | 165 // Factory function, creates a new instance and returns ownership. |
166 // For normal usage, set |is_stub| to false. | 166 static MediaTransferProtocolDaemonClient* Create(dbus::Bus* bus); |
167 static MediaTransferProtocolDaemonClient* Create(dbus::Bus* bus, | |
168 bool is_stub); | |
169 | 167 |
170 protected: | 168 protected: |
171 // Create() should be used instead. | 169 // Create() should be used instead. |
172 MediaTransferProtocolDaemonClient(); | 170 MediaTransferProtocolDaemonClient(); |
173 | 171 |
174 private: | 172 private: |
175 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClient); | 173 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClient); |
176 }; | 174 }; |
177 | 175 |
178 } // namespace device | 176 } // namespace device |
179 | 177 |
180 #endif // DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_
H_ | 178 #endif // DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_
H_ |
OLD | NEW |