Commit 41bae5a7 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update RoomListContract.kt

parent b0fb3485
...@@ -3,6 +3,9 @@ package chat.rocket.android.fragment.chatroom.list ...@@ -3,6 +3,9 @@ package chat.rocket.android.fragment.chatroom.list
import chat.rocket.core.models.Message import chat.rocket.core.models.Message
import chat.rocket.core.models.User import chat.rocket.core.models.User
/**
* Created by Filipe de Lima Brito (filipedelimabrito@gmail.com) on 9/22/17.
*/
interface RoomListContract { interface RoomListContract {
interface View { interface View {
...@@ -11,22 +14,25 @@ interface RoomListContract { ...@@ -11,22 +14,25 @@ interface RoomListContract {
* Shows a pinned message list of a room. * Shows a pinned message list of a room.
* *
* @param dataSet The pinned message data set to show. * @param dataSet The pinned message data set to show.
* @param total The total number of pinned messages.
*/ */
fun showPinnedMessages(dataSet: ArrayList<Message>) fun showPinnedMessages(dataSet: ArrayList<Message>, total: String)
/** /**
* Shows a favorite message list of a room. * Shows a favorite message list of a room.
* *
* @param dataSet The favorite message data set to show. * @param dataSet The favorite message data set to show.
* @param total The total number of favorite messages.
*/ */
fun showFavoriteMessages(dataSet: ArrayList<Message>) fun showFavoriteMessages(dataSet: ArrayList<Message>, total: String)
/** /**
* Shows a file list of a room. * Shows a file list of a room.
* *
* @param dataSet The file data set to show. * @param dataSet The file data set to show.
* @param total The total number of files.
*/ */
fun showFileList(dataSet: ArrayList<String>) fun showFileList(dataSet: ArrayList<String>, total: String)
/** /**
* Shows a list of members of a room. * Shows a list of members of a room.
...@@ -42,6 +48,13 @@ interface RoomListContract { ...@@ -42,6 +48,13 @@ interface RoomListContract {
* @param message The message to show. * @param message The message to show.
*/ */
fun showMessage(message: String) fun showMessage(message: String)
/**
* Shows a waiting view whenever a (long) process is taken.
*
* @param shouldShow The Boolean value that indicates whether the view should be showed.
*/
fun showWaitingView(shouldShow: Boolean)
} }
interface Presenter { interface Presenter {
...@@ -53,14 +66,14 @@ interface RoomListContract { ...@@ -53,14 +66,14 @@ interface RoomListContract {
* @param hostname The server hostname to process the request. * @param hostname The server hostname to process the request.
* @param token The token to process the request. * @param token The token to process the request.
* @param userId The user ID to process the request. * @param userId The user ID to process the request.
* @param offset The offset to start to process the request. * @param offset The offset to process the request.
*/ */
fun requestPinnedMessages(roomId: String, fun requestPinnedMessages(roomId: String,
roomType: String, roomType: String,
hostname: String, hostname: String,
token: String, token: String,
userId: String, userId: String,
offset: String) offset: Int)
/** /**
* Requests the favorite messages of a room. * Requests the favorite messages of a room.
...@@ -70,14 +83,14 @@ interface RoomListContract { ...@@ -70,14 +83,14 @@ interface RoomListContract {
* @param hostname The server hostname to process the request. * @param hostname The server hostname to process the request.
* @param token The token to process the request. * @param token The token to process the request.
* @param userId The user ID to process the request. * @param userId The user ID to process the request.
* @param offset The offset to start to process the request. * @param offset The offset to process the request.
*/ */
fun requestFavoriteMessages(roomId: String, fun requestFavoriteMessages(roomId: String,
roomType: String, roomType: String,
hostname: String, hostname: String,
token: String, token: String,
userId: String, userId: String,
offset: String) offset: Int)
/** /**
* Requests the file list of a room. * Requests the file list of a room.
...@@ -87,14 +100,14 @@ interface RoomListContract { ...@@ -87,14 +100,14 @@ interface RoomListContract {
* @param hostname The server hostname to process the request. * @param hostname The server hostname to process the request.
* @param token The token to process the request. * @param token The token to process the request.
* @param userId The user ID to process the request. * @param userId The user ID to process the request.
* @param offset The offset to start to process the request. * @param offset The offset to process the request.
*/ */
fun requestFileList(roomId: String, fun requestFileList(roomId: String,
roomType: String, roomType: String,
hostname: String, hostname: String,
token: String, token: String,
userId: String, userId: String,
offset: String) offset: Int)
/** /**
* Requests the member list of a room. * Requests the member list of a room.
...@@ -104,13 +117,13 @@ interface RoomListContract { ...@@ -104,13 +117,13 @@ interface RoomListContract {
* @param hostname The server hostname to process the request. * @param hostname The server hostname to process the request.
* @param token The token to process the request. * @param token The token to process the request.
* @param userId The user ID to process the request. * @param userId The user ID to process the request.
* @param offset The offset to start to process the request. * @param offset The offset to process the request.
*/ */
fun requestMemberList(roomId: String, fun requestMemberList(roomId: String,
roomType: String, roomType: String,
hostname: String, hostname: String,
token: String, token: String,
userId: String, userId: String,
offset: String) offset: Int)
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment