chromiumos/platform/mtpd.git
17 months agoAdd more temporary #ifdef to mtpd, so it can build with both libchrome-180609 and... 08/59508/3 factory-4455.B factory-pit-4390.B factory-pit-4471.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-pit-4482.B firmware-wolf-4389.24.B master release-R30-4537.B stabilize-4443.B stabilize-4512.B
Lei Zhang [Fri, 21 Jun 2013 01:15:14 +0000 (18:15 -0700)]
Add more temporary #ifdef to mtpd, so it can build with both libchrome-180609 and with Chromium r205050+.

BUG=none
TEST=emerge mtpd on ChromeOS, ninja -C out/Debug mtpd on Linux.

Change-Id: Ib6e6ec01e4e62042a3edf7e5d78affba7db43279
Reviewed-on: https://gerrit.chromium.org/gerrit/59508
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>

17 months agoOnly call to g_thread_init() when using glib older than 2.32. 90/59690/2 release-R29-4319.B
Ben Chan [Sat, 22 Jun 2013 19:08:14 +0000 (12:08 -0700)]
Only call to g_thread_init() when using glib older than 2.32.

g_thread_init() has been deprecated since glib 2.32 and the symbol is
not longer exported since glib 2.34. This CL modifies mtpd to only
call g_thread_init() when using glib older than 2.32.

BUG=chromium:253025
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that mtpd still runs on CrOS.

Change-Id: I78398ad381d1cdd4fdef9f52f47bda2a240a7331
Reviewed-on: https://gerrit.chromium.org/gerrit/59690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

19 months agoFix mtpd ARM sandbox policy. 54/48854/2 factory-4128.B factory-4290.B factory-pit-4280.B factory-spring-4131.B factory-spring-4262.B release-R28-4100.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-spring-4100.53.B toolchainB
Jorge Lucangeli Obes [Tue, 23 Apr 2013 00:40:53 +0000 (17:40 -0700)]
Fix mtpd ARM sandbox policy.

BUG=chromium:230983
TEST=mtpd loads

Change-Id: Ie8529706965ffaa96566ab92c8839b20c8c0a664
Reviewed-on: https://gerrit.chromium.org/gerrit/48854
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jorge Lucangeli Obes <jorgelo@chromium.org>

20 months agoReadDirectory calls for empty directories should not return an error. 00/45900/2 stabilize-4008.0.B stabilize-4035.0.B
Lei Zhang [Tue, 19 Mar 2013 22:08:31 +0000 (15:08 -0700)]
ReadDirectory calls for empty directories should not return an error.

BUG=chromium:222205
TEST=Reading from a device with an empty directory does not return an error.

Change-Id: Ie7ab89f0f2cb997923c90664f84e89502fcc1da4
Reviewed-on: https://gerrit.chromium.org/gerrit/45900
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
20 months agoAdd more temporary #ifdef to mtpd, so it can build with both libchrome-180609 and... 67/44867/2 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B stabilize-3881.0.B
Lei Zhang [Thu, 7 Mar 2013 20:29:55 +0000 (12:29 -0800)]
Add more temporary #ifdef to mtpd, so it can build with both libchrome-180609 and with Chromium r181380+.

BUG=none
TEST=emerge mtpd on ChromeOS, make mtpd on Linux.

Change-Id: I926eaab400f4e1a8a697d374ee96a6c58b5666a0
Reviewed-on: https://gerrit.chromium.org/gerrit/44867
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
20 months agoAdd a temporary #ifdef to mtpd, so it can build with both 19/44119/2
Lei Zhang [Wed, 27 Feb 2013 00:21:52 +0000 (16:21 -0800)]
Add a temporary #ifdef to mtpd, so it can build with both
libchrome-180609 and with Chromium r184358+.

BUG=none
TEST=emerge mtpd on ChromeOS, make mtpd on Linux.

Change-Id: Ieb3db557c1c45dae8876ebd74b01358b7274beb4
Reviewed-on: https://gerrit.chromium.org/gerrit/44119
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>

21 months agoUpdate mtpd against libchrome-180609. 23/43323/3
Lei Zhang [Thu, 14 Feb 2013 22:28:23 +0000 (14:28 -0800)]
Update mtpd against libchrome-180609.

- Move FilePath to base namespace.
- Use scoped_ptr now that it can replace ScopedGenericObj.

BUG=chromium-os:38942
TEST=emerge mtpd
CQ-DEPEND=CL:43331

Change-Id: If8cea129d402cad0a000dec32917b0809a9b3669
Reviewed-on: https://gerrit.chromium.org/gerrit/43323
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>

21 months agomtpd: Updating common.mk to ToT to enable profiling 82/42782/4 release-R26-3701.B stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-bluetooth-smart toolchain-3701.42.B
Ryan Harrison [Wed, 6 Feb 2013 21:37:09 +0000 (16:37 -0500)]
mtpd: Updating common.mk to ToT to enable profiling

This update replaces the current common.mk used in this project with the newest
version. This will allow all of the common.mk based projects to be on the same
version for debugging and enables profiling support.

BUG=chromium-os:37854
TEST=Exectuted the following commands to confirm the build works:
     MODE=profiling cros_workon_make --board=link
     MODE=profiling cros_workon_make --board=link --test
     cros_workon_make --board=link
     cros_workon_make --board=link --test
     Repeated these with emerge-link, USE=profiling, and
     FEATURES=test as need.
     For the emerge command with profiling and testing enable, confirmed the
     appropriate coverage files were created in /usr/share/profiling/...

Change-Id: I5ad51421bfefbd6fb9c5c520a43c52768d710b6e
Reviewed-on: https://gerrit.chromium.org/gerrit/42782
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Tested-by: Ryan Harrison <rharrison@chromium.org>
22 months agoFree file handles obtained from LIBMTP_Get_Files_And_Folders(). 17/41917/3 stabilize-3658.0.0
Lei Zhang [Thu, 24 Jan 2013 06:40:46 +0000 (22:40 -0800)]
Free file handles obtained from LIBMTP_Get_Files_And_Folders().

BUG=chromium-os:38186
TEST=manual: run mtpd under Valgrind and access the device.

Change-Id: I2e91bfedbf30232640c4f802408cd20f6231efbf
Reviewed-on: https://gerrit.chromium.org/gerrit/41917
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
22 months agoDo not open MTP devices more than once. 12/41912/2
Lei Zhang [Thu, 24 Jan 2013 05:14:40 +0000 (21:14 -0800)]
Do not open MTP devices more than once.

BUG=chromium-os:38183
TEST=manual, see bug.

Change-Id: Icf06a1e7b82d6ebd781fb74e7d79914f5d26a01c
Reviewed-on: https://gerrit.chromium.org/gerrit/41912
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
22 months agoFully initialize a sigset_t variable. 92/41892/2
Lei Zhang [Thu, 24 Jan 2013 00:15:11 +0000 (16:15 -0800)]
Fully initialize a sigset_t variable.

BUG=none
TEST=Running mtpd under Valgrind does not immediately trigger an error.

Change-Id: I6650b4acb0990f9bc5ebad7fab6a5b14203003b5
Reviewed-on: https://gerrit.chromium.org/gerrit/41892
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoRemove deprecated EnumerateStorage DBus method. 68/38668/2 factory-3536.B stabilize2 toolchain-3428.65.B master-backup
Lei Zhang [Mon, 26 Nov 2012 21:46:31 +0000 (13:46 -0800)]
Remove deprecated EnumerateStorage DBus method.

BUG=chromium-os:36450
TEST=emerge mtpd

Change-Id: I2bc5da22963b759f181aeed719aa6df01728a164
Reviewed-on: https://gerrit.chromium.org/gerrit/38668
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoAdd, deprecate, and remove mtpd methods. Fix ReadFileChunk. 24/38224/6
Lei Zhang [Fri, 16 Nov 2012 21:35:37 +0000 (13:35 -0800)]
Add, deprecate, and remove mtpd methods. Fix ReadFileChunk.

- Add EnumerateStorages.
- Deprecate EnumerateStorage.
- Remove ReadFileBy{Path,Id}.
- Add ReadFileChunkBy{Path,Id} to org.chromium.Mtpd.conf.
- Also check for requests to read 0 bytes in ReadFileChunkBy{Path,Id}.

BUG=chromium-os:36450
TEST=emerge mtpd

Change-Id: I7aa71d31e07d86dc552f57921a527076a064f90d
Reviewed-on: https://gerrit.chromium.org/gerrit/38224
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoImplement ReadFileChunkBy{File,Id}. 73/37973/3
Lei Zhang [Wed, 14 Nov 2012 02:38:38 +0000 (18:38 -0800)]
Implement ReadFileChunkBy{File,Id}.

ReadFile does not work for large files:
- Takes too long and causes D-Bus timeouts.
- Client may not want to read the entire file into memory at once.

BUG=chromium:160860
TEST=emerge mtpd.

Change-Id: I6dad15c5d79d492b59bb60e8aa91b1061bff1a07
Reviewed-on: https://gerrit.chromium.org/gerrit/37973
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoUpdate seccomp policies for mtpd.
Lei Zhang [Thu, 18 Oct 2012 04:40:57 +0000 (21:40 -0700)]
Update seccomp policies for mtpd.

BUG=none
TEST=mtpd starts up.

Change-Id: I614f105c65e3a6a47aab22a4cee5909b48393d1c
Reviewed-on: https://gerrit.chromium.org/gerrit/35929
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoSwitch from g_unix_signal_add() to signalfd()/g_io_add_watch_full().
Lei Zhang [Tue, 16 Oct 2012 23:48:43 +0000 (16:48 -0700)]
Switch from g_unix_signal_add() to signalfd()/g_io_add_watch_full().

This lets Chromium Linux also build mtpd on Ubuntu 10.04 with an older version
of glib.

BUG=chromium:151685
TEST=emerge mtpd

Change-Id: If4d920d1591811b951760e4fc8192ad0c0a8cdab
Reviewed-on: https://gerrit.chromium.org/gerrit/35766
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoAdd some ifdefs so mtpd can be built on Chromium Linux as well.
Lei Zhang [Thu, 11 Oct 2012 05:51:18 +0000 (22:51 -0700)]
Add some ifdefs so mtpd can be built on Chromium Linux as well.

BUG=none
TEST=emerge mtpd still works on CrOS.

Change-Id: I340b7bba1db4603b7e12ad1b0b3fd18a7c903fc7
Reviewed-on: https://gerrit.chromium.org/gerrit/35252
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoSwitch from CrOS callback aka protobuf callback to base::Bind.
Lei Zhang [Tue, 25 Sep 2012 22:47:01 +0000 (15:47 -0700)]
Switch from CrOS callback aka protobuf callback to base::Bind.

BUG=none
TEST=emerge mtpd

Change-Id: Ieed7c107d02a5b84b91fb2b5af0cb11dc2c26a4c
Reviewed-on: https://gerrit.chromium.org/gerrit/34054
Reviewed-by: <ajwong@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoRemove '..' as an include directory. factory-2993.B factory-3004.B
Lei Zhang [Thu, 4 Oct 2012 02:27:44 +0000 (19:27 -0700)]
Remove '..' as an include directory.

BUG=none
TEST=emerge mtpd

Change-Id: If7e523220c77bd62a39da48dd45a2115ddd7ad47
Reviewed-on: https://gerrit.chromium.org/gerrit/34595
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoMinor cleanup after moving a constant to system_api. factory-2985.B
Lei Zhang [Sat, 22 Sep 2012 01:15:43 +0000 (18:15 -0700)]
Minor cleanup after moving a constant to system_api.

BUG=none
TEST=emerge mtpd

Change-Id: I76f9b66bfc0ba846e7ce137580e56a764420f10e
Reviewed-on: https://gerrit.chromium.org/gerrit/33837
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoCleanup: Remove gflags dependency.
Lei Zhang [Wed, 19 Sep 2012 23:21:29 +0000 (16:21 -0700)]
Cleanup: Remove gflags dependency.

BUG=none
TEST=emerge mtpd

Change-Id: Id7e65de713de71318618512e7c32fa23560a687f
Reviewed-on: https://gerrit.chromium.org/gerrit/33672
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoAmend syscall filter policies. factory-2914.B release-R23-2913.B stabilize stabilize-daisy stabilize-link stabilize-link-2913.278
Jorge Lucangeli Obes [Fri, 14 Sep 2012 20:53:15 +0000 (13:53 -0700)]
Amend syscall filter policies.

BUG=None
TEST='start mtpd' works in alex, lumpy, daisy.

Change-Id: I5db85e5238147b54cd1e3129f77f196be30cef13
Reviewed-on: https://gerrit.chromium.org/gerrit/33354
Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2 years agoFix header generation dependency.
Lei Zhang [Fri, 14 Sep 2012 19:10:46 +0000 (12:10 -0700)]
Fix header generation dependency.

BUG=chromium-os:34434
TEST=Parallel builds are happy.

Change-Id: Ifa4be7212e2db1dc22d5aca8922cd2324dfb6ea0
Reviewed-on: https://gerrit.chromium.org/gerrit/33339
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoRemove --foreground option and just never daemonize.
Lei Zhang [Fri, 14 Sep 2012 04:16:36 +0000 (21:16 -0700)]
Remove --foreground option and just never daemonize.
This seems to be the easiest way to make Upstart happy.

BUG=chromium-os:29557
TEST=manual, mtpd starts and stops properly.

Change-Id: Ibe1700edbe0405167da0c60be85786dad39901cc
Reviewed-on: https://gerrit.chromium.org/gerrit/33274
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
2 years agoUse Minijail to launch mtpd.
Jorge Lucangeli Obes [Thu, 13 Sep 2012 00:35:13 +0000 (17:35 -0700)]
Use Minijail to launch mtpd.

BUG=chromium-os:33228
TEST=dbus-send EnumerateStorage works when launching mtpd with Minijail.
TEST=End-to-end testing with PoC app.

Change-Id: I46b355ad1ad8f2f62cb8d5bf3974af16d8b2f9b5
Reviewed-on: https://gerrit.chromium.org/gerrit/33154
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>

2 years agoAdd syscall filtering policies for mtpd.
Jorge Lucangeli Obes [Tue, 11 Sep 2012 21:24:50 +0000 (14:24 -0700)]
Add syscall filtering policies for mtpd.

BUG=chromium-os:33228
TEST=dbus-send EnumerateStorage works when launching mtpd with Minijail.

Change-Id: Ieece3188e119af0958eea5a2a03595db77e23a69
Reviewed-on: https://gerrit.chromium.org/gerrit/32977
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>

2 years agoFill in the 'storage_name' field in the MtpStorageInfo protobuf.
Lei Zhang [Tue, 11 Sep 2012 21:58:13 +0000 (14:58 -0700)]
Fill in the 'storage_name' field in the MtpStorageInfo protobuf.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: Iae6548d0348fbb9bd698fe070891c1a365e9f0d0
Reviewed-on: https://gerrit.chromium.org/gerrit/32995
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoFix dbus code to send protobufs as an array of bytes rather than as a
Lei Zhang [Fri, 7 Sep 2012 03:18:26 +0000 (20:18 -0700)]
Fix dbus code to send protobufs as an array of bytes rather than as a
string.

BUG=chromium-os:29557
TEST=mtpd does not crash anymore.

Change-Id: I23e15222a76e3812709e6071272bc598fa978054
Reviewed-on: https://gerrit.chromium.org/gerrit/32585
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoAdd a upstart configuration for mtpd.
Lei Zhang [Mon, 10 Sep 2012 22:10:54 +0000 (15:10 -0700)]
Add a upstart configuration for mtpd.

BUG=chromium-os:29557
TEST=none

Change-Id: I037d5a01ce272c73d9d47888da7038b4dd41b605
Reviewed-on: https://gerrit.chromium.org/gerrit/32814
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoHandle the case of GetFileInfo for the root node. Clarify which
Lei Zhang [Wed, 5 Sep 2012 21:54:48 +0000 (14:54 -0700)]
Handle the case of GetFileInfo for the root node. Clarify which
"root node" constant to use for any given context.

BUG=chromium-os:29557
TEST=Included unit tests. Calling GetFileByPath for "/" works. Calling GetFileById for 0 works.

Change-Id: Icaa9a61d6d21e42872c1e1123575582a15f32748
Reviewed-on: https://gerrit.chromium.org/gerrit/32291
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoLet libmtp probe devices that specify a custom vendor interface.
Lei Zhang [Wed, 5 Sep 2012 01:29:01 +0000 (18:29 -0700)]
Let libmtp probe devices that specify a custom vendor interface.

BUG=chromium-os:29557
TEST=Motorola Xoom gets properly detected.

Change-Id: Ib2659c5102c276adaad0abe1441c84bba4de1212
Reviewed-on: https://gerrit.chromium.org/gerrit/32201
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoConvert mtpd to use protobufs. factory-2848.B
Lei Zhang [Fri, 31 Aug 2012 21:36:59 +0000 (14:36 -0700)]
Convert mtpd to use protobufs.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: I14f9531eb69c93ebbef1ec507319ac67a1896db4
Reviewed-on: https://gerrit.chromium.org/gerrit/32059
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoTry getting the vendor/product from the device itself if it is not a known device. factory-2846.B
Lei Zhang [Wed, 29 Aug 2012 02:05:24 +0000 (19:05 -0700)]
Try getting the vendor/product from the device itself if it is not a known device.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: I73645badc246a8bcf06997e21a1f4be9b5b82ad3
Reviewed-on: https://gerrit.chromium.org/gerrit/31669
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoAllow dbus calls to GetFileInfoById/Path.
Lei Zhang [Wed, 29 Aug 2012 00:04:19 +0000 (17:04 -0700)]
Allow dbus calls to GetFileInfoById/Path.

BUG=chromium-os:29557
TEST=none

Change-Id: I467dcc65ce97edaab6a2e30d1f456c684c0ff284
Reviewed-on: https://gerrit.chromium.org/gerrit/31657
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoImplement GetFileInfoByPath and GetFileInfoById. firmware-stout-2817.B
Lei Zhang [Wed, 22 Aug 2012 22:47:19 +0000 (15:47 -0700)]
Implement GetFileInfoByPath and GetFileInfoById.

BUG=chromium-os:29557
TEST=emerge mtpd, included unit tests.

Change-Id: I01181eaa9ae42b53e7940bf0c8cd98293899c636
Reviewed-on: https://gerrit.chromium.org/gerrit/31242
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoCleanup: refactor redundant error handling code, fix minor style issues, fix comments.
Lei Zhang [Wed, 22 Aug 2012 22:20:36 +0000 (15:20 -0700)]
Cleanup: refactor redundant error handling code, fix minor style issues, fix comments.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: Ib59ef6f0337618810a53a8e2f59fadd1e8c8baf6
Reviewed-on: https://gerrit.chromium.org/gerrit/31162
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
2 years agoImplement ReadDirectory and ReadFile. firmware-butterfly-2788.B
Lei Zhang [Fri, 17 Aug 2012 05:52:49 +0000 (22:52 -0700)]
Implement ReadDirectory and ReadFile.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: I5446e72a9718036484b187f02d9cfda6e12a392b
Reviewed-on: https://gerrit.chromium.org/gerrit/30659
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoImplement OpenStorage() and CloseStorage().
Lei Zhang [Tue, 7 Aug 2012 22:22:05 +0000 (15:22 -0700)]
Implement OpenStorage() and CloseStorage().

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: Ibc3ccedc7d5e199f50d0b6fc611acf6ec30d6f4f
Reviewed-on: https://gerrit.chromium.org/gerrit/29485
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoImplemented MTP device attach/detach notification and EnumerateStorage().
Lei Zhang [Tue, 7 Aug 2012 00:05:33 +0000 (17:05 -0700)]
Implemented MTP device attach/detach notification and EnumerateStorage().

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: I72819230f1ffe981a9ba95ba826d3f17e2a31766
Reviewed-on: https://gerrit.chromium.org/gerrit/29369
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoUse mtpd service constants. factory-2717.B factory-2723.14.B release-R22-2723.B
Lei Zhang [Mon, 6 Aug 2012 20:29:27 +0000 (13:29 -0700)]
Use mtpd service constants.

BUG=chromium-os:29557
TEST=emerge mtpd

Change-Id: I0fbaa3d7d51834da5f06ec3ad8217841add66604
Reviewed-on: https://gerrit.chromium.org/gerrit/29318
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoDefine the dbus protocol to use and add a dummy implementation.
Lei Zhang [Fri, 3 Aug 2012 18:02:20 +0000 (11:02 -0700)]
Define the dbus protocol to use and add a dummy implementation.

BUG=chromium-os:29557
TEST=emerge succeeds

Change-Id: I2dc86f4a253d561fd37bff82cf71be716de824a0
Reviewed-on: https://gerrit.chromium.org/gerrit/29183
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoAdd a dummy implementation of mtpd.
Lei Zhang [Fri, 3 Aug 2012 03:41:53 +0000 (20:41 -0700)]
Add a dummy implementation of mtpd.

BUG=chromium-os:29557
TEST=none

Change-Id: Iec8b5d337a08b2b8aba71fc1a38fce9805129e86
Reviewed-on: https://gerrit.chromium.org/gerrit/29137
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
2 years agoInitial commit to set up repository.
David James [Fri, 3 Aug 2012 02:55:54 +0000 (19:55 -0700)]
Initial commit to set up repository.