aboutsummaryrefslogtreecommitdiffstats
path: root/flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt
diff options
context:
space:
mode:
authorAmit Kumar <amitkma@e.email>2021-04-29 02:25:01 +0530
committerAmit Kumar <amitkma@e.email>2021-04-29 02:25:01 +0530
commit449e419dfbafeed9a446e36f8de1903981cd0b02 (patch)
treec961334c95a6def92420fa57bd640ad2dbbe2959 /flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt
parentc00ab1009aa512fe89b8965cb0bee3827c64fd98 (diff)
downloadadvanced-privacy-449e419dfbafeed9a446e36f8de1903981cd0b02.tar.gz
Add initial implementation of mvi based on kotlin flow
Diffstat (limited to 'flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt')
-rw-r--r--flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt27
1 files changed, 27 insertions, 0 deletions
diff --git a/flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt b/flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt
new file mode 100644
index 0000000..aa6f624
--- /dev/null
+++ b/flow-mvi/src/main/java/foundation/e/flowmvi/MVIView.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2021 E FOUNDATION
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package foundation.e.flowmvi
+
+import kotlinx.coroutines.flow.Flow
+
+interface MVIView<State, out Action> {
+
+ fun render(state: State)
+
+ fun actions(): Flow<Action>
+}