summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-01-29 05:33:00 -0800
committerSan Mehat <san@google.com>2010-01-29 06:14:10 -0800
commitf29ed1a8e3d1e2f41cc47adfcccad3daa942ab6a (patch)
treea41b1b6416e11aaccf1fa3773b24e25532ee81ab /include
parent2631f993753d726c8c6a85ab66a83db79e54f0bb (diff)
downloadhardware_libhardware_legacy-f29ed1a8e3d1e2f41cc47adfcccad3daa942ab6a.zip
hardware_libhardware_legacy-f29ed1a8e3d1e2f41cc47adfcccad3daa942ab6a.tar.gz
hardware_libhardware_legacy-f29ed1a8e3d1e2f41cc47adfcccad3daa942ab6a.tar.bz2
libhardware_legacy: Refactor C++ bindings for new API
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/IMountService.h67
1 files changed, 22 insertions, 45 deletions
diff --git a/include/hardware_legacy/IMountService.h b/include/hardware_legacy/IMountService.h
index c299b54..257319c 100644
--- a/include/hardware_legacy/IMountService.h
+++ b/include/hardware_legacy/IMountService.h
@@ -28,55 +28,32 @@ namespace android {
class IMountService : public IInterface
{
public:
- DECLARE_META_INTERFACE(MountService);
-
- /**
- * Is mass storage support enabled?
- */
- virtual bool getMassStorageEnabled() = 0;
-
- /**
- * Enable or disable mass storage support.
- */
- virtual void setMassStorageEnabled(bool enabled) = 0;
-
- /**
- * Is mass storage connected?
- */
- virtual bool getMassStorageConnected() = 0;
-
- /**
- * Mount external storage at given mount point.
- */
- virtual void mountVolume(String16 mountPoint) = 0;
+ static const int OperationSucceeded = 0;
+ static const int OperationFailedInternalError = -1;
+ static const int OperationFailedNoMedia = -2;
+ static const int OperationFailedMediaBlank = -3;
+ static const int OperationFailedMediaCorrupt = -4;
+ static const int OperationFailedVolumeNotMounted = -5;
- /**
- * Safely unmount external storage at given mount point.
- */
- virtual void unmountVolume(String16 mountPoint) = 0;
- /**
- * Format external storage at given mount point.
- */
- virtual void formatVolume(String16 mountPoint) = 0;
-
- /**
- * Returns true if we're playing media notification sounds.
- */
- virtual bool getPlayNotificationSounds() = 0;
-
- /**
- * Sets whether or not media notification sounds are played.
- */
- virtual void setPlayNotificationSounds(bool enabled) = 0;
+public:
+ DECLARE_META_INTERFACE(MountService);
+ virtual void getShareMethodList() = 0;
+ virtual bool getShareMethodAvailable(String16 method) = 0;
+ virtual int shareVolume(String16 path, String16 method) = 0;
+ virtual int unshareVolume(String16 path, String16 method) = 0;
+ virtual bool getVolumeShared(String16 path, String16 method) = 0;
+ virtual int mountVolume(String16 path) = 0;
+ virtual int unmountVolume(String16 path) = 0;
+ virtual int formatVolume(String16 path) = 0;
virtual String16 getVolumeState(String16 mountPoint) = 0;
- virtual String16 createSecureContainer(String16 id, int sizeMb, String16 fstype, String16 key, int ownerUid) = 0;
- virtual void finalizeSecureContainer(String16 id) = 0;
- virtual void destroySecureContainer(String16 id) = 0;
- virtual String16 mountSecureContainer(String16 id, String16 key, int ownerUid) = 0;
- virtual void unmountSecureContainer(String16 id) = 0;
- virtual void renameSecureContainer(String16 oldId, String16 newId) = 0;
+ virtual int createSecureContainer(String16 id, int sizeMb, String16 fstype, String16 key, int ownerUid) = 0;
+ virtual int finalizeSecureContainer(String16 id) = 0;
+ virtual int destroySecureContainer(String16 id) = 0;
+ virtual int mountSecureContainer(String16 id, String16 key, int ownerUid) = 0;
+ virtual int unmountSecureContainer(String16 id) = 0;
+ virtual int renameSecureContainer(String16 oldId, String16 newId) = 0;
virtual String16 getSecureContainerPath(String16 id) = 0;
virtual void getSecureContainerList() = 0;
virtual void shutdown() = 0;