diff --git a/Volume.h b/Volume.h
index 689cd53..838cf1c 100644
--- a/Volume.h
+++ b/Volume.h
@@ -20,6 +20,7 @@
 #include <utils/List.h>
 
 class NetlinkEvent;
+class VolumeManager;
 
 class Volume {
 private:
@@ -27,38 +28,56 @@
 
 public:
     static const int State_Init       = -1;
+    static const int State_NoMedia    = 0;
     static const int State_Idle       = 1;
     static const int State_Pending    = 2;
-    static const int State_Mounted    = 3;
-    static const int State_Checking   = 4;
-    static const int State_Formatting = 5;
+    static const int State_Checking   = 3;
+    static const int State_Mounted    = 4;
+    static const int State_Unmounting = 5;
+    static const int State_Formatting = 6;
+    static const int State_Shared     = 7;
+    static const int State_SharedMnt  = 8;
 
 protected:
     char *mLabel;
     char *mMountpoint;
+    VolumeManager *mVm;
+
+    /*
+     * The major/minor tuple of the currently mounted filesystem.
+     */
+    dev_t mCurrentlyMountedKdev;
 
 public:
-    Volume(const char *label, const char *mount_point);
+    Volume(VolumeManager *vm, const char *label, const char *mount_point);
     virtual ~Volume();
 
-    int mount();
-    int unmount();
+    int mountVol();
+    int unmountVol();
+    int formatVol();
 
     const char *getLabel() { return mLabel; }
     const char *getMountpoint() { return mMountpoint; }
     int getState() { return mState; }
 
     virtual int handleBlockEvent(NetlinkEvent *evt);
+    virtual dev_t getDiskDevice();
+    virtual void handleVolumeShared();
+    virtual void handleVolumeUnshared();
 
 protected:
     void setState(int state);
 
-    virtual int prepareToMount(int *major, int *minor) = 0;
+    virtual int getDeviceNodes(dev_t *devs, int max) = 0;
 
     int createDeviceNode(const char *path, int major, int minor);
 
 private:
     int checkFilesystem(const char *nodepath);
+    int doMountVfat(const char *deviceNode, const char *mountPoint);
+    int doFormatVfat(const char *deviceNode);
+    int initializeMbr(const char *deviceNode);
+    bool isMountpointMounted(const char *path);
 };
 
 typedef android::List<Volume *> VolumeCollection;
