Use dbus for event notification
[platform/core/security/ode.git] / server / internal-encryption.cpp
index 20449e5..a81302a 100644 (file)
@@ -449,8 +449,6 @@ InternalEncryptionServer::InternalEncryptionServer(ServerContext& srv,
        server.expose(this, "", (unsigned int)(InternalEncryptionServer::getSupportedOptions)());
        server.expose(this, "", (std::string)(InternalEncryptionServer::getDevicePath)());
 
-       server.createNotification("InternalEncryptionServer::mount");
-
        std::string source = findDevPath();
 
        if (getStateInternal() == State::Encrypted) {
@@ -536,7 +534,7 @@ int InternalEncryptionServer::mount(const std::vector<unsigned char> &mk, unsign
        try {
                engine->mount(key, getOptions());
 
-               server.notify("InternalEncryptionServer::mount");
+               EventNotifier::emit("internal", "mounted");
 
                runtime::File("/tmp/.lazy_mount").create(O_WRONLY);
                runtime::File("/tmp/.unlock_mnt").create(O_WRONLY);
@@ -696,7 +694,7 @@ int InternalEncryptionServer::encrypt(const std::string& password, unsigned int
 
                        INFO(SINK, "Encryption completed.");
                        ::vconf_set_str(VCONFKEY_ODE_CRYPTO_STATE, "encrypted");
-                       server.notify("InternalEncryptionServer::mount");
+                       EventNotifier::emit("internal", "encrypted");
 
                        file.remove();