Add UML files for class and sequence diagrams 02/115702/6 accepted/tizen/common/20170227.043122 accepted/tizen/ivi/20170227.050303 accepted/tizen/mobile/20170227.050213 accepted/tizen/tv/20170227.050229 accepted/tizen/unified/20170309.033756 accepted/tizen/wearable/20170227.050244 submit/tizen/20170224.093500 submit/tizen_unified/20170308.100409
authorSungjun, Lee <sjun221.lee@samsung.com>
Tue, 21 Feb 2017 05:43:59 +0000 (14:43 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Fri, 24 Feb 2017 09:31:00 +0000 (18:31 +0900)
Change-Id: I1eab0f7702225cfeeee488c0418c847c57d5ec58
Signed-off-by: Sungjun, Lee <sjun221.lee@samsung.com>
doc/diagram/class/ode.uml [new file with mode: 0644]
doc/diagram/sequence/ode-external-decrypt.uml [new file with mode: 0644]
doc/diagram/sequence/ode-external-encrypt.uml [new file with mode: 0644]
doc/diagram/sequence/ode-internal-decrypt-dmcrypt.uml [new file with mode: 0644]
doc/diagram/sequence/ode-internal-decrypt-ext4.uml [new file with mode: 0644]
doc/diagram/sequence/ode-internal-encrypt-dmcrypt.uml [new file with mode: 0644]
doc/diagram/sequence/ode-internal-encrypt-ext4.uml [new file with mode: 0644]
doc/diagram/sequence/ode-secure-clean.uml [new file with mode: 0644]
doc/diagram/sequence/ode-secure-erase.uml [new file with mode: 0644]

diff --git a/doc/diagram/class/ode.uml b/doc/diagram/class/ode.uml
new file mode 100644 (file)
index 0000000..23b5a70
--- /dev/null
@@ -0,0 +1,98 @@
+@startuml
+
+class ODEContext
+
+ODEContext "1" *--> "1" rmi.Client
+
+namespace ode {
+
+class AppBundle
+class Launchpad
+class Block
+class BlockDevice
+
+BlockDevice "1" ..> "1" Block
+Launchpad "1" ..> "1" AppBundle
+
+class Server
+
+Server "1" *--> "1" rmi.Service
+Server "1" ..> "1" ExternalEncryption
+Server "1" ..> "1" InternalEncryption
+Server "1" ..> "1" SecureErase
+Server "1" ..> "1" KeyGenerator
+
+class ExternalEncryption
+class InternalEncryption
+class SecureErase
+
+ExternalEncryption "1" ..> "1" EcryptfsEngine
+ExternalEncryption "1" ..> "1" AppBundle
+ExternalEncryption "1" ..> "1" Launchpad
+ExternalEncryption "1" ..> "1" KeyManager
+InternalEncryption "1" ..> "1" DMCryptEngine
+InternalEncryption "1" ..> "1" Ext4Engine
+InternalEncryption "1" ..> "1" KeyManager
+SecureErase "1" ..> "1" MMCEraseEngine
+
+class CryptInfo
+class DMCryptEngine
+class Ext4Engine
+class EcryptfsEngine
+class MMCEraseEngine
+class Ext4Tool
+class ProgressBar
+class FileFooter
+class KernelKeyRing
+
+DMCryptEngine "1" ..> "1" Ext4Tool
+DMCryptEngine "1" *--> "1" ProgressBar
+DMCryptEngine "1" *--> "1" CryptInfo
+DMCryptEngine "1" ..> "1" KeyManager
+DMCryptEngine "1" ..> "1" FileFooter
+Ext4Engine "1" *--> "1" ProgressBar
+Ext4Engine "1" ..> "1" KeyManager
+Ext4Engine "1" ..> "1" FileFooter
+Ext4Engine "1" ..> "1" KeyGenerator
+EcryptfsEngine "1" *--> "1" ProgressBar
+EcryptfsEngine "1" ..> "1" KeyManager
+EcryptfsEngine "1" ..> "1" FileFooter
+EcryptfsEngine "1" ..> "1" KernelKeyRing
+MMCEraseEngine "1" *--> "1" ProgressBar
+MMCEraseEngine "1" ..> "1" Block
+MMCEraseEngine "1" ..> "1" BlockDevice
+MMCEraseEngine "1" ..> "1" Ext4Tool
+FileFooter "1" ..> "1" KeyGenerator
+
+class AntiForensics
+class KeyManager
+class KeyStore
+class KeyGenerator
+KeyManager "1" *--> "1" KeyStore
+KeyManager "1" ..> "1" AntiForensics
+KeyManager "1" ..> "1" KeyGenerator
+
+}
+
+namespace rmi {
+
+class Client
+
+Client "1" *--> "1" Connection
+
+class Connection
+class Service
+class Socket
+class Mainloop
+
+Service "1" ..> "1" Connection
+Service "1" ..> "1" Socket
+Service "1" *--> "1" Mainloop
+Client "1" *--> "1" Mainloop
+Client "1" ..> "1" Socket
+Connection "1" ..> "1" Socket
+Mainloop "1" ..> "1" Connection
+
+}
+
+@enduml
diff --git a/doc/diagram/sequence/ode-external-decrypt.uml b/doc/diagram/sequence/ode-external-decrypt.uml
new file mode 100644 (file)
index 0000000..594e04b
--- /dev/null
@@ -0,0 +1,96 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> ExternalEncryption : construct
+activate ExternalEncryption
+ExternalEncryption -> Service : setMethodHandler
+ExternalEncryption -> EcryptfsEngine : construct
+activate EcryptfsEngine
+
+participant FileFooter
+participant KeyManager
+
+EcryptfsEngine -> ProgressBar : construct
+activate ProgressBar
+ExternalEncryption -> ExternalEncryption : externalAddEventReceiver
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_external_encryption_decrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> ExternalEncryption : ExternalEncryption::decrypt
+
+ExternalEncryption -> EcryptfsEngine : getKeyMeta
+EcryptfsEngine -> FileFooter : read
+FileFooter --> EcryptfsEngine
+EcryptfsEngine --> ExternalEncryption
+
+ExternalEncryption -> KeyManager : construct
+activate KeyManager
+ExternalEncryption -> KeyManager : verifyPassword
+ExternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+ExternalEncryption -> ExternalEncryption: killDependedApplications
+ExternalEncryption -> EcryptfsEngine : umount
+EcryptfsEngine -> EcryptfsEngine : ecryptfsUmount
+ExternalEncryption -> EcryptfsEngine : decrypt
+
+EcryptfsEngine -> EcryptfsEngine : isEnoughToCopyInPlace
+EcryptfsEngine -> EcryptfsEngine : ecryptfsMount(key)
+
+EcryptfsEngine -> EcryptfsEngine : copyInPlace
+EcryptfsEngine -> ProgressBar : update
+
+EcryptfsEngine -> EcryptfsEngine : ecryptfsUmount
+EcryptfsEngine -> EcryptfsEngine : sync
+EcryptfsEngine -> ProgressBar : done
+
+ExternalEncryption -> ExternalEncryption: setOptions
+ExternalEncryption -> ExternalEncryption: sync
+ExternalEncryption --> Service : reply
+deactivate ExternalEncryption
+deactivate EcryptfsEngine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-external-encrypt.uml b/doc/diagram/sequence/ode-external-encrypt.uml
new file mode 100644 (file)
index 0000000..9ea5c7a
--- /dev/null
@@ -0,0 +1,93 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> ExternalEncryption : construct
+activate ExternalEncryption
+ExternalEncryption -> Service : setMethodHandler
+ExternalEncryption -> EcryptfsEngine : construct
+activate EcryptfsEngine
+
+participant FileFooter
+participant KeyManager
+
+EcryptfsEngine -> ProgressBar : construct
+activate ProgressBar
+ExternalEncryption -> ExternalEncryption : externalAddEventReceiver
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_external_encryption_encrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> ExternalEncryption : ExternalEncryption::encrypt
+
+ExternalEncryption -> EcryptfsEngine : getKeyMeta
+EcryptfsEngine -> FileFooter : read
+FileFooter --> EcryptfsEngine
+EcryptfsEngine --> ExternalEncryption
+
+ExternalEncryption -> KeyManager : construct
+activate KeyManager
+ExternalEncryption -> KeyManager : verifyPassword
+ExternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+ExternalEncryption -> ExternalEncryption: killDependedApplications
+ExternalEncryption -> EcryptfsEngine : encrypt
+
+EcryptfsEngine -> EcryptfsEngine : isEnoughToCopyInPlace
+EcryptfsEngine -> EcryptfsEngine : ecryptfsMount(key)
+
+EcryptfsEngine -> EcryptfsEngine : copyInPlace
+EcryptfsEngine -> ProgressBar : update
+
+EcryptfsEngine -> EcryptfsEngine : sync
+EcryptfsEngine -> ProgressBar : done
+
+ExternalEncryption -> ExternalEncryption: setOptions
+ExternalEncryption -> ExternalEncryption: sync
+ExternalEncryption --> Service : reply
+deactivate ExternalEncryption
+deactivate EcryptfsEngine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-internal-decrypt-dmcrypt.uml b/doc/diagram/sequence/ode-internal-decrypt-dmcrypt.uml
new file mode 100644 (file)
index 0000000..e78443c
--- /dev/null
@@ -0,0 +1,97 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> InternalEncryption : construct
+activate InternalEncryption
+InternalEncryption -> Service : setMethodHandler
+InternalEncryption -> DMCryptEngine : construct
+activate DMCryptEngine
+
+participant FileFooter
+participant KeyManager
+
+DMCryptEngine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_internal_encryption_decrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> InternalEncryption : InternalEncryption::decrypt
+
+InternalEncryption -> DMCryptEngine : getKeyMeta
+DMCryptEngine -> FileFooter : read
+FileFooter --> DMCryptEngine
+DMCryptEngine --> InternalEncryption
+
+InternalEncryption -> KeyManager : construct
+activate KeyManager
+InternalEncryption -> KeyManager : verifyPassword
+InternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+InternalEncryption -> InternalEncryption: stopSystemdUserSessions
+InternalEncryption -> InternalEncryption: stopDependedSystemServices
+InternalEncryption -> InternalEncryption: showProgressUI(Decrypting)
+InternalEncryption -> DMCryptEngine: umount
+
+DMCryptEngine -> DMCryptEngine : umount
+DMCryptEngine -> DMCryptEngine : destroyCryptoBlkDev
+
+InternalEncryption -> DMCryptEngine : decrypt
+
+DMCryptEngine -> DMCryptEngine : sanitizeKey
+DMCryptEngine -> DMCryptEngine : createCryptoBlkDev(key)
+DMCryptEngine -> DMCryptEngine : encryptInPlace
+DMCryptEngine -> ProgressBar : update
+DMCryptEngine -> ProgressBar : done
+DMCryptEngine -> DMCryptEngine : destroyCryptoBlkDev
+
+InternalEncryption -> InternalEncryption: sync
+InternalEncryption -> InternalEncryption: reboot
+InternalEncryption --> Service : reply
+deactivate InternalEncryption
+deactivate DMCryptEngine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-internal-decrypt-ext4.uml b/doc/diagram/sequence/ode-internal-decrypt-ext4.uml
new file mode 100644 (file)
index 0000000..a92ab83
--- /dev/null
@@ -0,0 +1,97 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> InternalEncryption : construct
+activate InternalEncryption
+InternalEncryption -> Service : setMethodHandler
+InternalEncryption -> Ext4Engine : construct
+activate Ext4Engine
+
+participant FileFooter
+participant KeyManager
+
+Ext4Engine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_internal_encryption_decrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> InternalEncryption : InternalEncryption::decrypt
+
+InternalEncryption -> Ext4Engine : getKeyMeta
+Ext4Engine -> FileFooter : read
+FileFooter --> Ext4Engine
+Ext4Engine --> InternalEncryption
+
+InternalEncryption -> KeyManager : construct
+activate KeyManager
+InternalEncryption -> KeyManager : verifyPassword
+InternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+InternalEncryption -> InternalEncryption: stopSystemdUserSessions
+InternalEncryption -> InternalEncryption: stopDependedSystemServices
+InternalEncryption -> InternalEncryption: showProgressUI(Decrypting)
+InternalEncryption -> InternalEncryption: stopDependedSystemServices
+InternalEncryption -> Ext4Engine : umount
+
+Ext4Engine -> Ext4Engine : umount
+
+InternalEncryption -> Ext4Engine : decrypt
+
+Ext4Engine -> Ext4Engine : isEnoughToCopyInPlace
+Ext4Engine -> Ext4Engine : hasPolicy
+Ext4Engine -> Ext4Engine : copyInPlace
+Ext4Engine -> ProgressBar : update
+Ext4Engine -> Ext4Engine : sync
+Ext4Engine -> ProgressBar : done
+
+InternalEncryption -> InternalEncryption: sync
+InternalEncryption -> InternalEncryption: reboot
+InternalEncryption --> Service : reply
+deactivate InternalEncryption
+deactivate Ext4Engine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-internal-encrypt-dmcrypt.uml b/doc/diagram/sequence/ode-internal-encrypt-dmcrypt.uml
new file mode 100644 (file)
index 0000000..9d8c8b7
--- /dev/null
@@ -0,0 +1,94 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> InternalEncryption : construct
+activate InternalEncryption
+InternalEncryption -> Service : setMethodHandler
+InternalEncryption -> DMCryptEngine : construct
+activate DMCryptEngine
+
+participant FileFooter
+participant KeyManager
+
+DMCryptEngine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_internal_encryption_encrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> InternalEncryption : InternalEncryption::encrypt
+
+InternalEncryption -> DMCryptEngine : getKeyMeta
+DMCryptEngine -> FileFooter : read
+FileFooter --> DMCryptEngine
+DMCryptEngine --> InternalEncryption
+
+InternalEncryption -> KeyManager : construct
+activate KeyManager
+InternalEncryption -> KeyManager : verifyPassword
+InternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+InternalEncryption -> InternalEncryption: stopSystemdUserSessions
+InternalEncryption -> InternalEncryption: stopDependedSystemServices
+InternalEncryption -> InternalEncryption: showProgressUI(Encrypting)
+InternalEncryption -> InternalEncryption: umount(opt/usr)
+InternalEncryption -> DMCryptEngine : encrypt
+
+DMCryptEngine -> DMCryptEngine : sanitizeKey
+DMCryptEngine -> DMCryptEngine : createCryptoBlkDev(key)
+DMCryptEngine -> DMCryptEngine : encryptInPlace
+DMCryptEngine -> ProgressBar : update
+DMCryptEngine -> ProgressBar : done
+DMCryptEngine -> DMCryptEngine : destroyCryptoBlkDev
+
+InternalEncryption -> InternalEncryption: setOptions
+InternalEncryption -> InternalEncryption: sync
+InternalEncryption -> InternalEncryption: reboot
+InternalEncryption --> Service : reply
+deactivate InternalEncryption
+deactivate DMCryptEngine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-internal-encrypt-ext4.uml b/doc/diagram/sequence/ode-internal-encrypt-ext4.uml
new file mode 100644 (file)
index 0000000..84b5d8e
--- /dev/null
@@ -0,0 +1,98 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> InternalEncryption : construct
+activate InternalEncryption
+InternalEncryption -> Service : setMethodHandler
+InternalEncryption -> Ext4Engine : construct
+activate Ext4Engine
+
+participant FileFooter
+participant KeyManager
+
+Ext4Engine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_internal_encryption_encrypt
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> InternalEncryption : InternalEncryption::encrypt
+
+InternalEncryption -> Ext4Engine : getKeyMeta
+Ext4Engine -> FileFooter : read
+FileFooter --> Ext4Engine
+Ext4Engine --> InternalEncryption
+
+InternalEncryption -> KeyManager : construct
+activate KeyManager
+InternalEncryption -> KeyManager : verifyPassword
+InternalEncryption -> KeyManager : getMasterKey
+deactivate KeyManager
+
+InternalEncryption -> InternalEncryption: stopSystemdUserSessions
+InternalEncryption -> InternalEncryption: stopDependedSystemServices
+InternalEncryption -> InternalEncryption: showProgressUI(Encrypting)
+InternalEncryption -> InternalEncryption: umount(opt/usr)
+InternalEncryption -> Ext4Engine : encrypt
+
+Ext4Engine -> Ext4Engine : isEnoughToCopyInplace
+Ext4Engine -> Ext4Engine : mount
+Ext4Engine -> Ext4Engine : sanitizeKey
+Ext4Engine -> Ext4Engine : addKeyToKeyring(key)
+Ext4Engine -> Ext4Engine : setPolicy
+Ext4Engine -> Ext4Engine : copyInPlace
+Ext4Engine -> Ext4Engine : mount
+Ext4Engine -> ProgressBar : update
+Ext4Engine -> Ext4Engine : sync
+Ext4Engine -> ProgressBar : done
+
+InternalEncryption -> InternalEncryption: setOptions
+InternalEncryption -> InternalEncryption: sync
+InternalEncryption -> InternalEncryption: reboot
+InternalEncryption --> Service : reply
+deactivate InternalEncryption
+deactivate Ext4Engine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-secure-clean.uml b/doc/diagram/sequence/ode-secure-clean.uml
new file mode 100644 (file)
index 0000000..ecb5ffe
--- /dev/null
@@ -0,0 +1,88 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> SecureErase : construct
+activate SecureErase
+SecureErase -> Service : setMethodHandler
+SecureErase -> MMCEraseEngine : construct
+activate MMCEraseEngine
+
+participant Ext4Tool
+participant BlockDevice
+
+MMCEraseEngine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_secure_clean
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> SecureErase : SecureErase::clean
+
+SecureErase -> MMCEraseEngine : cleanDevice
+
+MMCEraseEngine -> BlockDevice : construct
+activate BlockDevice
+MMCEraseEngine -> Ext4Tool : construct
+activate Ext4Tool
+MMCEraseEngine -> Ext4Tool : getTotoalBlockCount
+MMCEraseEngine -> BlockDevice : getSize
+loop
+MMCEraseEngine -> Ext4Tool : isUsedBlock
+alt Block is Used
+MMCEraseEngine -> BlockDevice : discard
+BlockDevice -> BlockDevice : open
+BlockDevice -> BlockDevice : ioctl(BLKDISCARD)
+BlockDevice -> BlockDevice : close
+end
+MMCEraseEngine -> ProgressBar : update
+end
+MMCEraseEngine -> ProgressBar : done
+
+SecureErase -> SecureErase : dropCachePage
+SecureErase --> Service : reply
+deactivate SecureErase
+deactivate MMCEraseEngine
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml
diff --git a/doc/diagram/sequence/ode-secure-erase.uml b/doc/diagram/sequence/ode-secure-erase.uml
new file mode 100644 (file)
index 0000000..d52d69c
--- /dev/null
@@ -0,0 +1,99 @@
+@startuml
+hide footbox
+actor ODEDaemon
+activate ODEDaemon
+
+ODEDaemon -> Server : construct
+activate Server
+
+Server -> Service : construct(/tmp/.ode.sock)
+activate Service
+Service -> Mainloop : construct
+activate Mainloop
+Mainloop -> ServerConnection : construct
+activate ServerConnection
+Server -> SecureErase : construct
+activate SecureErase
+SecureErase -> Service : setMethodHandler
+SecureErase -> MMCEraseEngine : construct
+activate MMCEraseEngine
+
+participant Ext4Tool
+participant BlockDevice
+
+MMCEraseEngine -> ProgressBar : construct
+activate ProgressBar
+
+participant ClientConnection
+participant Client
+participant ODEContext
+
+actor ODELibrary
+
+ODEContext <- ODELibrary : ode_secure_erase
+activate ODEContext
+
+ODEContext -> Client : methodCall
+activate Client
+
+Client -> ClientConnection : send
+activate ClientConnection
+ClientConnection -> Mainloop : Request remote method call
+Client -> ClientConnection : dispatch
+Mainloop -> Service : Event source callback
+Service -> Service : onMessageProcess
+Service -> ServerConnection: dispatch
+ServerConnection --> Service
+Service -> SecureErase : SecureErase::erase
+
+alt File is Device
+SecureErase -> MMCEraseEngine : eraseDevice
+
+MMCEraseEngine -> BlockDevice : construct
+activate BlockDevice
+MMCEraseEngine -> Ext4Tool : construct
+activate Ext4Tool
+MMCEraseEngine -> Ext4Tool : getTotalBlockCount
+MMCEraseEngine -> BlockDevice : getSize
+MMCEraseEngine -> BlockDevice : discard
+BlockDevice -> BlockDevice : open
+BlockDevice -> BlockDevice : ioctl(BLKDISCARD)
+BlockDevice -> BlockDevice : close
+MMCEraseEngine -> ProgressBar : update
+MMCEraseEngine -> ProgressBar : done
+deactivate BlockDevice
+deactivate Ext4Tool
+
+else File is not Device
+SecureErase -> MMCEraseEngine : eraseFiles
+
+alt File is File
+MMCEraseEngine -> MMCEraseEngine : eraseFile
+else File is Directory
+MMCEraseEngine -> MMCEraseEngine : eraseDirectory
+end
+MMCEraseEngine -> ProgressBar : done
+end
+
+SecureErase -> SecureErase : dropCachePage
+SecureErase --> Service : reply
+deactivate SecureErase
+deactivate MMCEraseEngine
+deactivate BlockDevice
+deactivate Ext4Tool
+deactivate ProgressBar
+
+Service -> ServerConnection : send
+
+ServerConnection -> ClientConnection
+deactivate ServerConnection
+deactivate Service
+deactivate Mainloop
+ClientConnection --> Client
+deactivate ClientConnection
+Client --> ODEContext : result
+deactivate Client
+ODEContext --> ODELibrary : result
+deactivate ODEContext
+
+@enduml