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 CHROME_BROWSER_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CL
IENT_H_ | 9 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ |
10 #define CHROME_BROWSER_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CL
IENT_H_ | 10 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_ |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 | 18 |
19 #if !defined(OS_LINUX) | 19 #if !defined(OS_LINUX) |
20 #error "Only used on Linux and ChromeOS" | 20 #error "Only used on Linux and ChromeOS" |
21 #endif | 21 #endif |
22 | 22 |
23 class MtpFileEntry; | 23 class MtpFileEntry; |
24 class MtpStorageInfo; | 24 class MtpStorageInfo; |
25 | 25 |
26 namespace dbus { | 26 namespace dbus { |
27 class Bus; | 27 class Bus; |
28 } | 28 } |
29 | 29 |
30 namespace chrome { | 30 namespace device { |
31 | 31 |
32 // A class to make the actual DBus calls for mtpd service. | 32 // A class to make the actual DBus calls for mtpd service. |
33 // This class only makes calls, result/error handling should be done | 33 // This class only makes calls, result/error handling should be done |
34 // by callbacks. | 34 // by callbacks. |
35 class MediaTransferProtocolDaemonClient { | 35 class MediaTransferProtocolDaemonClient { |
36 public: | 36 public: |
37 // A callback to be called when DBus method call fails. | 37 // A callback to be called when DBus method call fails. |
38 typedef base::Callback<void()> ErrorCallback; | 38 typedef base::Callback<void()> ErrorCallback; |
39 | 39 |
40 // A callback to handle the result of EnumerateAutoMountableDevices. | 40 // A callback to handle the result of EnumerateAutoMountableDevices. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 bool is_stub); | 168 bool is_stub); |
169 | 169 |
170 protected: | 170 protected: |
171 // Create() should be used instead. | 171 // Create() should be used instead. |
172 MediaTransferProtocolDaemonClient(); | 172 MediaTransferProtocolDaemonClient(); |
173 | 173 |
174 private: | 174 private: |
175 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClient); | 175 DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClient); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace chrome | 178 } // namespace device |
179 | 179 |
180 #endif // CHROME_BROWSER_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON
_CLIENT_H_ | 180 #endif // DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_
H_ |
OLD | NEW |