Change to allow duplicated mount/umount API calls for lockscreen
[platform/core/security/ode.git] / server / engine / encryption / ecryptfs-engine.cpp
index b7d2161..b4a1c03 100644 (file)
@@ -325,11 +325,20 @@ EcryptfsEngine::~EcryptfsEngine()
 void EcryptfsEngine::mount(const data &key, unsigned int options)
 {
        ecryptfsMount(source, destination, key, options);
+
+       mounted = true;
 }
 
 void EcryptfsEngine::umount()
 {
        ecryptfsUmount(destination);
+
+       mounted = false;
+}
+
+bool EcryptfsEngine::isMounted()
+{
+       return mounted;
 }
 
 void EcryptfsEngine::encrypt(const data &key, unsigned int options)